feat: added achievements

This commit is contained in:
Андрей Сумин
2025-03-03 01:54:20 +03:00
parent 0b032100f8
commit ab90d362a2
26 changed files with 163 additions and 37 deletions
+2 -3
View File
@@ -2,13 +2,12 @@
from django.db.models.signals import m2m_changed
from django.dispatch import receiver
from apps.review.models import Review
from apps.task.models import CompetitionTask, CompetitionTaskSubmission
@receiver(m2m_changed, sender=CompetitionTask.reviewers.through)
def print_reviewers(sender, instance, action, **kwargs):
if action in ['post_add', 'post_remove', 'post_clear']:
if action in ["post_add", "post_remove", "post_clear"]:
submissions = CompetitionTaskSubmission.objects.filter(task=instance)
for submission in submissions:
submission.send_on_review()
submission.send_on_review()