FIX: flagging topic was giving error message
This commit is contained in:
parent
1b250f1e01
commit
bb99bd8a03
|
@ -81,7 +81,9 @@ Discourse.ActionSummary = Discourse.Model.extend({
|
||||||
flag_topic: this.get('flagTopic') ? true : false
|
flag_topic: this.get('flagTopic') ? true : false
|
||||||
}
|
}
|
||||||
}).then(function(result) {
|
}).then(function(result) {
|
||||||
return post.updateActionsSummary(result);
|
if (!self.get('flagTopic')) {
|
||||||
|
return post.updateActionsSummary(result);
|
||||||
|
}
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
self.removeAction();
|
self.removeAction();
|
||||||
var message = $.parseJSON(error.responseText).errors;
|
var message = $.parseJSON(error.responseText).errors;
|
||||||
|
|
Loading…
Reference in New Issue