diff --git a/aleksis/apps/paweljong/models.py b/aleksis/apps/paweljong/models.py index 456e043cb1e0c8aadf8effaaf6e27006526ce270..b818c073c5d7f50341427c20efc5c3790cae650c 100644 --- a/aleksis/apps/paweljong/models.py +++ b/aleksis/apps/paweljong/models.py @@ -311,10 +311,10 @@ class EventRegistration(ExtensibleModel): cost = models.IntegerField(verbose_name=_("Cost in €"), null=True, blank=True) - def save(self): + def save(self, *args, **kwargs): if not self.cost: self.cost = self.event.cost - + super().save(*args, **kwargs) def mark_checked_in(self): if not self.checked_in: diff --git a/aleksis/apps/paweljong/views.py b/aleksis/apps/paweljong/views.py index 8de1e65980922f9fed621e880845c3402bafbdb8..3d8b38dc0e06ca48791a08df77b46357d3d7467c 100644 --- a/aleksis/apps/paweljong/views.py +++ b/aleksis/apps/paweljong/views.py @@ -169,7 +169,7 @@ class EventRegistrationEditView(PermissionRequiredMixin, AdvancedEditView): form_class = EditEventRegistrationForm permission_required = "paweljong.change_registration_rule" template_name = "paweljong/event_registration/edit.html" - success_url = reverse_lazy("registrations") + success_url = reverse_lazy("index") success_message = _("The event registration has been saved.") @@ -235,7 +235,7 @@ class EventRegistrationDeleteView(PermissionRequiredMixin, AdvancedDeleteView): model = EventRegistration permission_required = "paweljong.delete_eventregistration_rule" template_name = "core/pages/delete.html" - success_url = reverse_lazy("registrations") + success_url = reverse_lazy("index") success_message = _("The registration has been deleted.") @@ -850,7 +850,7 @@ class SendMailFromRegistration(PermissionRequiredMixin, FormView): template_name = "paweljong/event_registration/notification.html" permission_required = "paweljong.send_notification_mail_rule" form_class = RegistrationNotificationForm - success_url = reverse_lazy("registrations") + success_url = reverse_lazy("index") def form_valid(self, form):