Skip to content

Commit

Permalink
subreddit: Add missing error on stylesheet conflict.
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-d committed Sep 28, 2012
1 parent 24e5187 commit 441ee6c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions r2/r2/controllers/api.py
Expand Up @@ -1264,6 +1264,8 @@ def POST_subreddit_stylesheet(self, form, jquery,
form.set_inputs(prevstyle=str(wr._id))
ModAction.create(c.site, c.user, 'wikirevise', description)
except ConflictException as e:
c.errors.add(errors.CONFLICT, field="stylesheet_contents")
form.has_errors("stylesheet_contents", errors.CONFLICT)
form.set_html(".status", _('conflict error'))
form.set_html(".errors ul", _('There was a conflict while editing the stylesheet'))
form.find('#conflict_box').show()
Expand Down

0 comments on commit 441ee6c

Please sign in to comment.