Skip to content

Commit

Permalink
Remove useless loop
Browse files Browse the repository at this point in the history
  • Loading branch information
juuso-j committed Jun 10, 2024
1 parent 8732e6d commit 1b6ada8
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@

class Command(BaseCommand):
def handle(self, *args, **options):
for situation in Situation.objects.all():
SituationAnnouncement.objects.filter(situation=situation).delete()
situation.delete()
SituationLocation.objects.all().delete()
SituationLocation.objects.all().delete()
SituationAnnouncement.objects.all().delete()
Situation.objects.all().delete()
logger.info("Deleted all situations.")

0 comments on commit 1b6ada8

Please sign in to comment.