correction d'un bug quand on publie un événement

This commit is contained in:
Jean-Marie Favreau 2023-12-16 21:34:33 +01:00
parent 92e1330fc4
commit 250f0b68e5

View File

@ -214,10 +214,10 @@ def change_status_event(request, pk, status):
event.status = Event.STATUS(status) event.status = Event.STATUS(status)
event.save(update_fields=["status"]) event.save(update_fields=["status"])
if self.request.user.is_authenticated: if request.user.is_authenticated:
return event.get_absolute_url() return HttpResponseRedirect(event.get_absolute_url())
else: else:
return reverse_lazy("home") return HttpResponseRedirect(reverse_lazy("home"))
else: else:
cancel_url = request.META.get('HTTP_REFERER', '') cancel_url = request.META.get('HTTP_REFERER', '')
if cancel_url == "": if cancel_url == "":