diff --git a/modules/GS1Importer.js b/modules/GS1Importer.js index 595b754ed..3fb1a8d5c 100644 --- a/modules/GS1Importer.js +++ b/modules/GS1Importer.js @@ -684,13 +684,15 @@ class GS1Importer { const object_key = vertex._key; const id_key = this.helper.createKey('identifier', sender, id_type, id_value); - identifiers.push({ - _key: id_key, - id_type, - id_value, - vertex_type: 'IDENTIFIER', - sender_id: senderId, - }); + if (!identifiers.find(el => el._key === id_key)) { + identifiers.push({ + _key: id_key, + id_type, + id_value, + vertex_type: 'IDENTIFIER', + sender_id: senderId, + }); + } identifierEdges.push({ _key: this.helper.createKey('identifies', sender, id_key, vertex.identifiers.uid), diff --git a/package-lock.json b/package-lock.json index 3e4718e8b..b2ff2be39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "2.0.22", + "version": "2.0.23", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 592408676..d666143ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "2.0.22", + "version": "2.0.23", "description": "OriginTrail node", "main": ".eslintrc.js", "config": {