mirror of
https://github.com/Screenly/Anthias.git
synced 2026-05-04 13:23:50 -04:00
Fix asset save.
This commit is contained in:
@@ -141,7 +141,7 @@ class EditAssetView extends Backbone.View
|
||||
@collection.add @model if not @model.collection
|
||||
(@$el.children ":first").modal 'hide'
|
||||
_.extend @model.attributes, data
|
||||
@model.collection.add @model if isNew
|
||||
@model.collection.add @model unless @edit
|
||||
save.fail =>
|
||||
(@$ '.progress').hide()
|
||||
(@$ 'input, select').prop 'disabled', off
|
||||
|
||||
@@ -329,7 +329,7 @@
|
||||
}
|
||||
(_this.$el.children(":first")).modal('hide');
|
||||
_.extend(_this.model.attributes, data);
|
||||
if (isNew) {
|
||||
if (!_this.edit) {
|
||||
return _this.model.collection.add(_this.model);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user