From 55259a759b0d22748a6e5a6e0f80ba431a5cf36b Mon Sep 17 00:00:00 2001 From: EwoutV Date: Tue, 16 Apr 2024 13:57:53 +0200 Subject: [PATCH] chore: linting --- backend/api/signals.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/backend/api/signals.py b/backend/api/signals.py index 4c054507..88054eaa 100644 --- a/backend/api/signals.py +++ b/backend/api/signals.py @@ -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: