diff --git a/accountant/frontend/static/js/accounts.js b/accountant/frontend/static/js/accounts.js index decfab8..eae3b57 100644 --- a/accountant/frontend/static/js/accounts.js +++ b/accountant/frontend/static/js/accounts.js @@ -119,14 +119,16 @@ angular.module('accountant.accounts', [ /* * Save account. */ - $scope.save = function($data, $index) { - var account = $scope.accounts[$index]; + $scope.save = function(account) { + //var account = $scope.accounts[$index]; - account = angular.merge(account, $data); + //account = angular.merge(account, $data); return account.$save().then(function(data) { Notification.success('Account #' + data.id + ' saved.'); + // TODO Alexis Lahouze 2016-03-08 Update solds + return data; }); }; diff --git a/accountant/frontend/static/views/accounts.html b/accountant/frontend/static/views/accounts.html index d5c7bc4..9920458 100644 --- a/accountant/frontend/static/views/accounts.html +++ b/accountant/frontend/static/views/accounts.html @@ -70,7 +70,7 @@