X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/42c42960c2dce4500f12dd14a68a10ed4f06abf5..f2dd9c713605ba2a17425267eb2c0c4b4f7dc928:/forum/views.py diff --git a/forum/views.py b/forum/views.py index 41b7eb8..6750d99 100644 --- a/forum/views.py +++ b/forum/views.py @@ -1,9 +1,8 @@ +# -*- coding: utf-8 -*- from django.core.exceptions import ObjectDoesNotExist import pybb.views import pybb.forms -from catalogue.models import Lesson - from .forms import PostForm from .models import Topic @@ -21,7 +20,7 @@ class PostEditMixin(pybb.views.PostEditMixin): pybb_post = self.object pybb_topic = pybb_post.topic - topic, topic_created = Topic.objects.get_or_create(pybb_topic = pybb_topic) + topic, topic_created = Topic.objects.get_or_create(pybb_topic=pybb_topic) if pybb_post == pybb_topic.head: topic.lesson = form.cleaned_data['lesson']