diff --git a/server/modules/dataImport/service/DataImportJob/DataImportJob.js b/server/modules/dataImport/service/DataImportJob/DataImportJob.js index 7b4a79dedc..a0369d40c8 100644 --- a/server/modules/dataImport/service/DataImportJob/DataImportJob.js +++ b/server/modules/dataImport/service/DataImportJob/DataImportJob.js @@ -151,7 +151,7 @@ export default class DataImportJob extends DataImportBaseJob { } } catch (e) { const { key, params } = e - const errorKey = key || Validation.messageKeys.dataImport.errorUpdatingValues + const errorKey = key ?? Validation.messageKeys.dataImport.errorUpdatingValues this._addError(errorKey, params) } } diff --git a/server/modules/record/manager/_recordManager/recordUpdateManager.js b/server/modules/record/manager/_recordManager/recordUpdateManager.js index 665ab515ad..254a487031 100644 --- a/server/modules/record/manager/_recordManager/recordUpdateManager.js +++ b/server/modules/record/manager/_recordManager/recordUpdateManager.js @@ -349,7 +349,11 @@ const _afterNodesUpdate = async ({ survey, record, nodes }, t) => { const rootUniqueNodeDefsModified = nodeDefsModified.filter((nodeDef) => { const nodeDefParent = Survey.getNodeDefParent(nodeDef)(survey) - return NodeDef.isRoot(nodeDefParent) && NodeDefValidations.isUnique(NodeDef.getValidations(nodeDef)) + return ( + NodeDef.isRoot(nodeDefParent) && + NodeDef.isSingle(nodeDef) && + NodeDefValidations.isUnique(NodeDef.getValidations(nodeDef)) + ) }) if (rootUniqueNodeDefsModified.length > 0) { // for each modified node def, validate record uniqueness of records with same record unique nodes