Skip to content

Commit 0d5254d

Browse files
committed
BAH-4203 | Update save condition logic to save single object at a time
1 parent 7019510 commit 0d5254d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

ui/app/common/domain/services/conditionsService.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ angular.module('bahmni.common.domain')
66
var conditionsToBeSaved = _.reject(conditions, function (condition) {
77
return condition.onSetDate === null || Number.isInteger(condition.onSetDate);
88
});
9-
var newConditions = _.filter(conditionsToBeSaved, function (condition) {
10-
return !condition.uuid;
11-
});
12-
var existingConditions = _.filter(conditionsToBeSaved, function (condition) {
13-
return condition.uuid;
14-
});
15-
conditionsToBeSaved = newConditions.length ? newConditions : existingConditions;
9+
1610
var promises = [];
1711

1812
_.forEach(conditionsToBeSaved, function (conditionToSave) {

0 commit comments

Comments
 (0)