openchs-models 1.27.19 → 1.27.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -454,7 +454,9 @@ class ObservationsHolder {
|
|
|
454
454
|
|
|
455
455
|
static convertObsForSave(observations) {
|
|
456
456
|
observations.forEach(observation => {
|
|
457
|
-
observation.valueJSON
|
|
457
|
+
if (observation.valueJSON && typeof observation.valueJSON !== "string") {
|
|
458
|
+
observation.valueJSON = JSON.stringify(observation.valueJSON);
|
|
459
|
+
}
|
|
458
460
|
});
|
|
459
461
|
}
|
|
460
462
|
|
package/dist/application/Form.js
CHANGED
|
@@ -127,8 +127,8 @@ class Form extends _BaseEntity.default {
|
|
|
127
127
|
_lodash.default.forEach(formMappings, ({
|
|
128
128
|
subjectType
|
|
129
129
|
}) => {
|
|
130
|
-
const outOfSyncDrafts = entityService.findAll("DraftSubject").filtered(`subjectType = $0`, subjectType);
|
|
131
|
-
entityService.
|
|
130
|
+
const outOfSyncDrafts = entityService.findAll("DraftSubject").filtered(`subjectType.uuid = $0`, subjectType.uuid);
|
|
131
|
+
entityService.deleteEntities(outOfSyncDrafts);
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
|