Commit 791026aa by Adam Palay

fix syntax error in views/article

parent ac906abe
...@@ -88,7 +88,7 @@ class Create(FormView, ArticleMixin): ...@@ -88,7 +88,7 @@ class Create(FormView, ArticleMixin):
# TODO: Handle individual exceptions better and give good feedback. # TODO: Handle individual exceptions better and give good feedback.
except Exception, e: except Exception, e:
transaction.rollback() transaction.rollback()
if self.request.user.is_superuser(): if self.request.user.is_superuser:
messages.error(self.request, _(u"There was an error creating this article: %s") % str(e)) messages.error(self.request, _(u"There was an error creating this article: %s") % str(e))
else: else:
messages.error(self.request, _(u"There was an error creating this article.")) messages.error(self.request, _(u"There was an error creating this article."))
...@@ -646,7 +646,7 @@ def root_create(request): ...@@ -646,7 +646,7 @@ def root_create(request):
return redirect('wiki:get', path=root.path) return redirect('wiki:get', path=root.path)
except NoRootURL: except NoRootURL:
pass pass
if not request.user.is_superuser(): if not request.user.is_superuser:
return redirect(settings.LOGIN_URL + "?next=" + reverse("wiki:root_create")) return redirect(settings.LOGIN_URL + "?next=" + reverse("wiki:root_create"))
if request.method == 'POST': if request.method == 'POST':
create_form = forms.CreateRootForm(request.POST) create_form = forms.CreateRootForm(request.POST)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment