mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-18 16:38:59 +00:00
Apply review comment
This commit is contained in:
1 parent
9272f53bea
commit
71b096f9ef
2 files changed
+18
-4
No files matched your search
+2
-4
@@ -174,11 +174,9 @@ class NewsUpdateView(PermissionOrAuthorRequiredMixin, UpdateView):
|
||||
permission_required = "com.edit_news"
|
||||
|
||||
def form_valid(self, form):
|
||||
self.object = form.save()
|
||||
response = super().form_valid(form) # Does the saving part
|
||||
IcsCalendar.make_internal()
|
||||
# Don't call `super().form_valid()`,
|
||||
# because it would trigger a second call to `form.save()`
|
||||
return HttpResponseRedirect(self.get_success_url())
|
||||
return response
|
||||
|
||||
def get_date_form_kwargs(self) -> dict[str, Any]:
|
||||
"""Get initial data for NewsDateForm"""
|
||||
|
||||
Reference in new issue
Block a user