mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 22:23:23 +00:00
Merge branch 'bugfix' into 'master'
fix topic creation See merge request !76
This commit is contained in:
commit
cef2230640
@ -155,7 +155,7 @@ class ForumTopicCreateView(CanCreateMixin, CreateView):
|
|||||||
return super(ForumTopicCreateView, self).dispatch(request, *args, **kwargs)
|
return super(ForumTopicCreateView, self).dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
topic = ForumTopic(title=form.instance.title, author=self.request.user, forum=self.forum)
|
topic = ForumTopic(_title=form.instance.title, author=self.request.user, forum=self.forum)
|
||||||
topic.save()
|
topic.save()
|
||||||
form.instance.topic = topic
|
form.instance.topic = topic
|
||||||
form.instance.author = self.request.user
|
form.instance.author = self.request.user
|
||||||
|
Loading…
Reference in New Issue
Block a user