subreddit: Add missing error on stylesheet conflict.

This commit is contained in:
Andre D
2012-09-22 19:13:35 -05:00
committed by Neil Williams
parent bfdcff6008
commit 871ff7eb0c

View File

@@ -1264,6 +1264,8 @@ class ApiController(RedditController, OAuth2ResourceController):
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()