From aa69584afde6c6e330ed3f97003b9ad34e5d7fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 22 Jun 2017 21:21:51 +0200 Subject: [PATCH] Fix wrong status object in elements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- js/controller/ListController.js | 2 +- js/service/ApiService.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/js/controller/ListController.js b/js/controller/ListController.js index 61df6f6da..16ec5f598 100644 --- a/js/controller/ListController.js +++ b/js/controller/ListController.js @@ -101,8 +101,8 @@ app.controller('ListController', function ($scope, $location, $filter, BoardServ $scope.boardUpdate = function(board) { BoardService.update(board).then(function(data) { $scope.filterData(); + board.status.edit = false; }); - board.status.edit = false; }; $scope.boardUpdateBegin = function(board) { diff --git a/js/service/ApiService.js b/js/service/ApiService.js index cbc394d6a..f3fa850e3 100644 --- a/js/service/ApiService.js +++ b/js/service/ApiService.js @@ -124,9 +124,8 @@ app.factory('ApiService', function($http, $q){ } else { Object.keys(entity).forEach(function (key) { element[key] = entity[key]; - if(element[key]!==null) - element[key].status = {}; }); + element.status = {}; } }; ApiService.prototype.remove = function(id) {