Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create superuser after library creations #1310

Merged
merged 2 commits into from
Jan 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions backend/core/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,14 @@ def startup(sender: AppConfig, **kwargs):
)
third_party_respondent.permissions.set(third_party_respondent_permissions)

# Create default Qualifications
try:
Qualification.create_default_qualifications()
except Exception as e:
logger.error("Error creating default qualifications", exc_info=e)

call_command("storelibraries")

# if superuser defined and does not exist, then create it
if (
CISO_ASSISTANT_SUPERUSER_EMAIL
Expand All @@ -601,14 +609,6 @@ def startup(sender: AppConfig, **kwargs):
except Exception as e:
logger.error("Error creating superuser", exc_info=e)

# Create default Qualifications
try:
Qualification.create_default_qualifications()
except Exception as e:
logger.error("Error creating default qualifications", exc_info=e)

call_command("storelibraries")


class CoreConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
Expand Down
Loading