Skip to content

Commit

Permalink
Update fill_db_using_fake_data
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-salles committed Sep 21, 2022
1 parent d94c49d commit a98f14e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bothub/common/management/commands/fill_db_using_fake_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ def handle(self, *args, **kwargs):

# Users

if not User.objects.filter(email="admin@bothub.it").exists:
if not User.objects.filter(email="admin@bothub.it").exists():
User.objects.create_superuser(
email="admin@bothub.it", nickname="admin", password="admin", name="Admin"
)

if not User.objects.filter(email="user@bothub.it").exists:
user = User.objects.filter(email="user@bothub.it").first()
if not user:
user = User.objects.create_user(
email="user@bothub.it", nickname="user", password="user", name="User"
)
Expand Down

0 comments on commit a98f14e

Please sign in to comment.