fix missing access to topic
This commit is contained in:
@@ -89,7 +89,7 @@ class TopicDetailView(LoginRequiredMixin, DetailView):
|
||||
|
||||
def get_queryset(self):
|
||||
topic_group_slug = self.kwargs.get("topic_group_slug")
|
||||
return Topic.objects.filter(Q(topic_group__slug=topic_group_slug))
|
||||
return Topic.objects.filter(topic_group__slug=topic_group_slug)
|
||||
|
||||
|
||||
class TopicUpdateView(LoginRequiredMixin, UpdateView):
|
||||
@@ -102,10 +102,9 @@ class TopicUpdateView(LoginRequiredMixin, UpdateView):
|
||||
add_log_action(self.request, form, "intern", "topic", False)
|
||||
return super().form_valid(form)
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context["topic"] = self.object
|
||||
return context
|
||||
def get_queryset(self):
|
||||
topic_group_slug = self.kwargs.get("topic_group_slug")
|
||||
return Topic.objects.filter(topic_group__slug=topic_group_slug)
|
||||
|
||||
|
||||
class AttachmentCreateView(LoginRequiredMixin, CreateView):
|
||||
|
||||
Reference in New Issue
Block a user