fix: Data duplication logic

This commit is contained in:
moanos [he/him] 2024-04-14 16:47:52 +02:00
parent 0bc3c3a764
commit 3fec80f5a7

View File

@ -19,9 +19,11 @@ class Command(BaseCommand):
# is already populated and no data will be added again
try:
AdoptionNotice.objects.get(name="Vermittung1TestSalt9227")
except AdoptionNotice.DoesNotExist:
print("Database already populated. No additional data will be created")
return
except AdoptionNotice.DoesNotExist:
pass
rescue1 = baker.make_recipe(
'fellchensammlung.rescue_org'