From e7937ade8d91f7741a649de24faacbe194a3c0d0 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 8 Aug 2023 06:48:14 +0300 Subject: Use relative imports to break circular import errors --- gn_auth/auth/authorisation/users/collections/models.py | 2 +- gn_auth/auth/authorisation/users/collections/views.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'gn_auth/auth/authorisation/users/collections') diff --git a/gn_auth/auth/authorisation/users/collections/models.py b/gn_auth/auth/authorisation/users/collections/models.py index eb9b188..9157100 100644 --- a/gn_auth/auth/authorisation/users/collections/models.py +++ b/gn_auth/auth/authorisation/users/collections/models.py @@ -6,7 +6,7 @@ from datetime import datetime from redis import Redis from email_validator import validate_email, EmailNotValidError -from gn_auth.auth.authorisation.errors import InvalidData, NotFoundError +from ...errors import InvalidData, NotFoundError from ..models import User diff --git a/gn_auth/auth/authorisation/users/collections/views.py b/gn_auth/auth/authorisation/users/collections/views.py index 9900205..a1cc30d 100644 --- a/gn_auth/auth/authorisation/users/collections/views.py +++ b/gn_auth/auth/authorisation/users/collections/views.py @@ -4,13 +4,14 @@ from uuid import UUID from redis import Redis from flask import jsonify, request, Response, Blueprint, current_app -from gn_auth.auth.db import sqlite3 as db -from gn_auth.auth.db.sqlite3 import with_db_connection -from gn_auth.auth.authorisation.checks import require_json -from gn_auth.auth.authorisation.errors import NotFoundError +from ....db import sqlite3 as db +from ....db.sqlite3 import with_db_connection -from gn_auth.auth.authentication.users import User, user_by_id -from gn_auth.auth.authentication.oauth2.resource_server import require_oauth +from ....authentication.users import User, user_by_id +from ....authentication.oauth2.resource_server import require_oauth + +from ...checks import require_json +from ...errors import NotFoundError from .models import ( add_traits, -- cgit v1.2.3