0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

fix: ensure import works when user id is 0

This commit is contained in:
kirrg001 2016-05-16 20:47:44 +02:00
parent 06a2920333
commit 9c9283e0c9

View file

@ -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