mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-17 04:59:37 -04:00
Split models to prevent circular imports
This commit is the first step to disentangling the models from the API clients. With the models in the same folder as the API clients it makes it hard to import the API clients within the model without getting a circular import. After this commit the user API clients still has this problem, but at least the service API client doesn’t.
This commit is contained in:
@@ -43,7 +43,7 @@ from app.main.validators import (
|
||||
ValidEmail,
|
||||
ValidGovEmail,
|
||||
)
|
||||
from app.notify_client.models import permissions, roles
|
||||
from app.models.user import permissions, roles
|
||||
from app.utils import AgreementInfo, guess_name_from_email_address
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ from app import (
|
||||
)
|
||||
from app.main import main
|
||||
from app.main.forms import CreateServiceForm
|
||||
from app.notify_client.models import InvitedUser
|
||||
from app.models.user import InvitedUser
|
||||
from app.utils import AgreementInfo, email_safe, is_gov_user
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ from app import (
|
||||
)
|
||||
from app.main import main
|
||||
from app.main.forms import InviteUserForm, PermissionsForm, SearchUsersForm
|
||||
from app.notify_client.models import permissions
|
||||
from app.models.user import permissions
|
||||
from app.utils import user_has_permissions
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user