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 495e17c commit d94c49d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions bothub/common/management/commands/fill_db_using_fake_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ def handle(self, *args, **kwargs):

# Users

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

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

# Categories

Expand Down

0 comments on commit d94c49d

Please sign in to comment.