From efbc9396ed2161b882fc4f154c9752e9440dc2de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksandar=20Veljkovi=C4=87?= <35335520+alexveljkovic@users.noreply.github.com> Date: Wed, 21 Nov 2018 16:25:20 +0100 Subject: [PATCH 1/2] Handle double identifiers (#751) --- modules/GS1Importer.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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), From 66b94bb5b4e5612e25193db623c4b6fff972e4fb Mon Sep 17 00:00:00 2001 From: Nebojsa Obradovic Date: Wed, 21 Nov 2018 16:27:55 +0100 Subject: [PATCH 2/2] Version update to v2.0.23 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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": {