From b14db571b0a89c0bb8dac90cda2e2373bc08d8a2 Mon Sep 17 00:00:00 2001 From: Marton Somogyi Date: Sat, 2 Mar 2013 13:31:46 +0100 Subject: [PATCH] Fix asset save. --- static/coffee/screenly-ose.coffee | 2 +- static/js/screenly-ose.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/static/coffee/screenly-ose.coffee b/static/coffee/screenly-ose.coffee index 91d71fe3..3cde9971 100644 --- a/static/coffee/screenly-ose.coffee +++ b/static/coffee/screenly-ose.coffee @@ -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 diff --git a/static/js/screenly-ose.js b/static/js/screenly-ose.js index fba6188b..7ccb1306 100644 --- a/static/js/screenly-ose.js +++ b/static/js/screenly-ose.js @@ -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); } });