mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
forum: fix ForumTopicSubscribeView error 500 with anonymous user
This commit is contained in:
parent
4ecad1c73b
commit
ebee8c34e1
@ -42,6 +42,7 @@ from core.views import (
|
|||||||
CanEditMixin,
|
CanEditMixin,
|
||||||
CanEditPropMixin,
|
CanEditPropMixin,
|
||||||
CanCreateMixin,
|
CanCreateMixin,
|
||||||
|
UserIsLoggedMixin,
|
||||||
can_view,
|
can_view,
|
||||||
)
|
)
|
||||||
from core.views.forms import MarkdownInput
|
from core.views.forms import MarkdownInput
|
||||||
@ -273,7 +274,9 @@ class ForumTopicEditView(CanEditMixin, UpdateView):
|
|||||||
template_name = "core/edit.jinja"
|
template_name = "core/edit.jinja"
|
||||||
|
|
||||||
|
|
||||||
class ForumTopicSubscribeView(CanViewMixin, SingleObjectMixin, RedirectView):
|
class ForumTopicSubscribeView(
|
||||||
|
CanViewMixin, UserIsLoggedMixin, SingleObjectMixin, RedirectView
|
||||||
|
):
|
||||||
model = ForumTopic
|
model = ForumTopic
|
||||||
pk_url_kwarg = "topic_id"
|
pk_url_kwarg = "topic_id"
|
||||||
permanent = False
|
permanent = False
|
||||||
|
Loading…
Reference in New Issue
Block a user