Merge pull request #2935 from mabashian/2873-first-last

Fixes bug removing first/last name from a user
This commit is contained in:
Ryan Petrello
2018-08-27 10:15:27 -04:00
committed by GitHub

View File

@@ -140,7 +140,11 @@ export default ['$scope', '$rootScope', '$stateParams', 'UserForm', 'Rest',
var processNewData = function(fields) {
var data = {};
_.forEach(fields, function(value, key) {
if ($scope[key] !== '' && $scope[key] !== null && $scope[key] !== undefined) {
if (value.type === 'sensitive') {
if ($scope[key] !== '' && $scope[key] !== null && $scope[key] !== undefined) {
data[key] = $scope[key];
}
} else {
data[key] = $scope[key];
}
});