mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 19:20:46 +08:00
Merge pull request #3887 from tgxworld/fix_duplicated_custom_badges
FIX: Duplicated custom badges in AdminBadgesController.
This commit is contained in:
commit
1906b99d1f
|
@ -68,7 +68,8 @@ export default Ember.Controller.extend(BufferedContent, {
|
||||||
model = this.get('model');
|
model = this.get('model');
|
||||||
this.get('model').save(data).then(function() {
|
this.get('model').save(data).then(function() {
|
||||||
if (newBadge) {
|
if (newBadge) {
|
||||||
self.get('controllers.admin-badges').pushObject(model);
|
var adminBadgesController = self.get('controllers.admin-badges');
|
||||||
|
if (!adminBadgesController.contains(model)) adminBadgesController.pushObject(model);
|
||||||
self.transitionToRoute('adminBadges.show', model.get('id'));
|
self.transitionToRoute('adminBadges.show', model.get('id'));
|
||||||
} else {
|
} else {
|
||||||
self.commitBuffer();
|
self.commitBuffer();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user