Verified Commit 538abe15 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Revert changes in saving

parent 1effd13f
......@@ -347,11 +347,10 @@ class Event(models.Model, metaclass=ModelTranslateMeta):
f'{settings.BASE_URL}'
f'{reverse("events:event", args=[self.id])}')
registration_reminder.save()
self.registration_reminder = registration_reminder
self.registration_reminder.users.set(
Member.current_members.all())
registration_reminder.save()
elif registration_reminder.pk is not None:
self.registration_reminder = None
registration_reminder.delete()
......
......@@ -98,6 +98,7 @@ class PizzaEvent(models.Model):
end_reminder.body_nl = "Je kan nog 10 minuten pizza's bestellen"
end_reminder.category = Category.objects.get(key='pizza')
end_reminder.time = self.end - timezone.timedelta(minutes=10)
end_reminder.save()
if self.event.registration_required:
end_reminder.users.set(self.event.registrations
......@@ -106,8 +107,6 @@ class PizzaEvent(models.Model):
else:
end_reminder.users.set(Member.current_members.all())
end_reminder.save()
self.end_reminder = end_reminder
elif (self.send_notification and self.end_reminder and
self._end != self.end):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment