Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutV committed Apr 16, 2024
1 parent 175c6b5 commit 55259a7
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions backend/api/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,32 +77,6 @@ def hook_structure_check(sender, instance: StructureCheck, **kwargs):
submission.save()


@receiver(post_save, sender=StructureCheck)
@receiver(post_delete, sender=StructureCheck)
def hook_structure_check(sender, instance: StructureCheck, **kwargs):
for group in instance.project.groups.all():
submissions = group.submissions.order_by("-submission_time")
if submissions:
run_structure_checks.send(sender=StructureCheck, submission=submissions[0])

for submission in submissions[1:]:
submission.is_valid = False
submission.save()


@receiver(post_save, sender=ExtraCheck)
@receiver(post_delete, sender=ExtraCheck)
def hook_extra_check(sender, instance: ExtraCheck, **kwargs):
for group in instance.project.groups.all():
submissions = group.submissions.order_by("-submission_time")
if submissions:
run_extra_checks.send(sender=ExtraCheck, submission=submissions[0])

for submission in submissions[1:]:
submission.is_valid = False
submission.save()


@receiver(post_save, sender=Submission)
def hook_submission(sender, instance: Submission, created: bool, **kwargs):
if created:
Expand Down

0 comments on commit 55259a7

Please sign in to comment.