openchs-models 1.11.3 → 1.11.4

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.
@@ -187,7 +187,10 @@ class Form {
187
187
  if (!_lodash.default.isNil(foundObs) && concept.isQuestionGroup()) {
188
188
  const clonedObs = foundObs.cloneForEdit();
189
189
  const sortedChildObs = this.orderObservations(clonedObs.getValueWrapper().getValue());
190
- clonedObs.valueJSON = JSON.stringify(new _QuestionGroup.default(sortedChildObs));
190
+
191
+ const uniqueObs = _lodash.default.uniqBy(sortedChildObs, obs => obs.concept.uuid);
192
+
193
+ clonedObs.valueJSON = JSON.stringify(new _QuestionGroup.default(uniqueObs));
191
194
  if (!_lodash.default.isEmpty(sortedChildObs)) orderedObservations.push(clonedObs);
192
195
  } else {
193
196
  if (!_lodash.default.isNil(foundObs)) orderedObservations.push(foundObs);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "openchs-models",
3
3
  "description": "OpenCHS data model to be used by front end clients",
4
- "version": "1.11.3",
4
+ "version": "1.11.4",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",