mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 17:02:45 +08:00
FIX: Display proper error on badge create
This commit is contained in:
parent
91588bed8b
commit
381784ea62
|
@ -1,3 +1,4 @@
|
||||||
|
import { popupAjaxError } from 'discourse/lib/ajax-error';
|
||||||
import BufferedContent from 'discourse/mixins/buffered-content';
|
import BufferedContent from 'discourse/mixins/buffered-content';
|
||||||
|
|
||||||
export default Ember.ObjectController.extend(BufferedContent, {
|
export default Ember.ObjectController.extend(BufferedContent, {
|
||||||
|
@ -64,11 +65,9 @@ export default Ember.ObjectController.extend(BufferedContent, {
|
||||||
self.set('savingStatus', I18n.t('saved'));
|
self.set('savingStatus', I18n.t('saved'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}).catch(function(error) {
|
}).catch(popupAjaxError).finally(function() {
|
||||||
self.set('savingStatus', I18n.t('failed'));
|
|
||||||
self.send('saveError', error);
|
|
||||||
}).finally(function() {
|
|
||||||
self.set('saving', false);
|
self.set('saving', false);
|
||||||
|
self.set('savingStatus', '');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user