Generate active accounts on debug mode

This commit is contained in:
Keannu Christian Bernasol 2025-09-14 01:28:28 +08:00
parent 73aa0f0c8a
commit 5afe6c28ab
2 changed files with 4 additions and 3 deletions

View file

@ -37,8 +37,9 @@ BACKEND_CACHE_USERNAME="REPLACE-ME"
BACKEND_CACHE_PASSWORD="REPLACE-ME" BACKEND_CACHE_PASSWORD="REPLACE-ME"
# DEBUG Variables: Only used in development # DEBUG Variables: Only used in development
BACKEND_PASSWORD="REPLACE-ME" BACKEND_DEBUG_USER_USERNAME="admin"
BACKEND_DEBUG_USER_EMAIL="admin@test.com"
BACKEND_DEBUG_USER_PASSWORD="REPLACE-ME"
# # CACHE # # CACHE
CACHE_USERNAME="REPLACE-ME" CACHE_USERNAME="REPLACE-ME"

View file

@ -20,6 +20,6 @@ def generate_test_users(sender, **kwargs):
""" """
if sender.name == "accounts" and config.DEBUG: if sender.name == "accounts" and config.DEBUG:
try: try:
users.generate_test_users() users.generate_test_users(active=True)
except Exception as e: except Exception as e:
logger.error(f"Error creating test users post-migration: {e}") logger.error(f"Error creating test users post-migration: {e}")