Skip to content

Commit

Permalink
Update superuser password if already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
jennydaman authored Aug 26, 2024
1 parent ffcd5ee commit dfad061
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chris_backend/core/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ def setup_chris(sender, **kwargs):
# create superuser chris
try:
chris_user = User.objects.get(username='chris')
chris_user.set_password(settings.CHRIS_SUPERUSER_PASSWORD)
chris_user.save()
except User.DoesNotExist:
chris_user = User.objects.create_superuser('chris', '[email protected]',
settings.CHRIS_SUPERUSER_PASSWORD)
Expand Down

0 comments on commit dfad061

Please sign in to comment.