Compare commits
2 commits
dc9928f316
...
3d1faa49c3
Author | SHA1 | Date | |
---|---|---|---|
Casper V. Kristensen | 3d1faa49c3 | ||
Casper V. Kristensen | 4cca8ced19 |
|
@ -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
|
# 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()
|
RaidResponse.objects.filter(character__user=instance, status=RaidResponse.NO_RESPONSE).delete()
|
||||||
# Then create them (again)
|
# Then create them (again)
|
||||||
|
if not instance.is_active:
|
||||||
|
return
|
||||||
RaidResponse.objects.bulk_create(
|
RaidResponse.objects.bulk_create(
|
||||||
RaidResponse(
|
RaidResponse(
|
||||||
raid=raid,
|
raid=raid,
|
||||||
|
@ -40,6 +42,6 @@ def create_user_no_responses(instance: User, **kwargs):
|
||||||
attendance=RaidResponse.STATUS_DEFAULT_ATTENDANCE[RaidResponse.NO_RESPONSE]
|
attendance=RaidResponse.STATUS_DEFAULT_ATTENDANCE[RaidResponse.NO_RESPONSE]
|
||||||
)
|
)
|
||||||
for raid in Raid.objects.exclude(
|
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)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -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
|
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
|
||||||
|
|
Loading…
Reference in a new issue