Compare commits

...

2 commits

2 changed files with 5 additions and 3 deletions

View file

@ -32,6 +32,8 @@ def create_user_no_responses(instance: User, **kwargs):
# Delete all pre-existing no-responses for this user, in case date_joined or main was changed
RaidResponse.objects.filter(character__user=instance, status=RaidResponse.NO_RESPONSE).delete()
# Then create them (again)
if not instance.is_active:
return
RaidResponse.objects.bulk_create(
RaidResponse(
raid=raid,
@ -40,6 +42,6 @@ def create_user_no_responses(instance: User, **kwargs):
attendance=RaidResponse.STATUS_DEFAULT_ATTENDANCE[RaidResponse.NO_RESPONSE]
)
for raid in Raid.objects.exclude(
Q(response_deadline__lt=instance.date_joined) | Q(responses__character__user=instance)
Q(date__lt=instance.date_joined) | Q(responses__character__user=instance)
)
)

View file

@ -1,3 +1,3 @@
Django==2.2.6
Django==3.0.2
psycopg2-binary>=2.5.4 # required by Django for PostgreSQL support: https://docs.djangoproject.com/en/2.2/ref/databases/#postgresql-notes
django-crispy-forms==1.7.2
django-crispy-forms==1.8.1