From 3fec80f5a70445f3d79cfdefa16f6c1697f53d07 Mon Sep 17 00:00:00 2001 From: moanos Date: Sun, 14 Apr 2024 16:47:52 +0200 Subject: [PATCH] fix: Data duplication logic --- src/fellchensammlung/management/commands/populate_db.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fellchensammlung/management/commands/populate_db.py b/src/fellchensammlung/management/commands/populate_db.py index ae59558..c08ec45 100644 --- a/src/fellchensammlung/management/commands/populate_db.py +++ b/src/fellchensammlung/management/commands/populate_db.py @@ -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'