Merge pull request #3417 from techAPJ/patch-2

FIX: flagging topic was giving error message
This commit is contained in:
Robin Ward 2015-04-30 16:50:37 -04:00
commit 886cd41b15

View File

@ -81,7 +81,9 @@ Discourse.ActionSummary = Discourse.Model.extend({
flag_topic: this.get('flagTopic') ? true : false
}
}).then(function(result) {
return post.updateActionsSummary(result);
if (!self.get('flagTopic')) {
return post.updateActionsSummary(result);
}
}).catch(function (error) {
self.removeAction();
var message = $.parseJSON(error.responseText).errors;