Skip to content

Commit

Permalink
create superuser after library creations (#1310)
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-intuitem authored Jan 4, 2025
1 parent 049f83f commit 351b98f
Showing 1 changed file with 8 additions and 8 deletions.
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

0 comments on commit 351b98f

Please sign in to comment.