From 303e05e5a9f4099e91cbc33d8ca66dddc5777925 Mon Sep 17 00:00:00 2001 From: JM Santos Date: Mon, 14 Aug 2017 10:50:59 +0800 Subject: [PATCH] Deleting password property if empty --- client/app/dashboard/model/edit/ModelEdit.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/app/dashboard/model/edit/ModelEdit.js b/client/app/dashboard/model/edit/ModelEdit.js index e4887e54..08168b8c 100644 --- a/client/app/dashboard/model/edit/ModelEdit.js +++ b/client/app/dashboard/model/edit/ModelEdit.js @@ -174,6 +174,9 @@ angular.module('dashboard.Dashboard.Model.Edit', [ * Check to see if any file upload functionality exist and upload files first then call to save the model data */ $scope.clickSaveModel = function(data) { + if (data.hasOwnProperty('password') && !data.password) { + delete data.password; + } $scope.status = "Saving..."; $scope.progress = 0.0; modalInstance = $modal.open({