From 9c9283e0c977c6c7b4308213e6e0f0cab0b6e92c Mon Sep 17 00:00:00 2001 From: kirrg001 Date: Mon, 16 May 2016 20:47:44 +0200 Subject: [PATCH] fix: ensure import works when user id is 0 --- core/server/data/import/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/server/data/import/utils.js b/core/server/data/import/utils.js index 1debc7edfe..7b5eff7d35 100644 --- a/core/server/data/import/utils.js +++ b/core/server/data/import/utils.js @@ -77,6 +77,9 @@ utils = { // if we don't have user data and the id is 1, we assume this means the owner existingUsers[owner.email].importId = userToMap; userMap[userToMap] = existingUsers[owner.email].realId; + } else if (userToMap === 0) { + // CASE: external context + userMap[userToMap] = '0'; } else { throw new errors.DataImportError( i18n.t('errors.data.import.utils.dataLinkedToUnknownUser', {userToMap: userToMap}), 'user.id', userToMap