mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
fix: ensure import works when user id is 0
This commit is contained in:
parent
06a2920333
commit
9c9283e0c9
1 changed files with 3 additions and 0 deletions
|
@ -77,6 +77,9 @@ utils = {
|
||||||
// if we don't have user data and the id is 1, we assume this means the owner
|
// if we don't have user data and the id is 1, we assume this means the owner
|
||||||
existingUsers[owner.email].importId = userToMap;
|
existingUsers[owner.email].importId = userToMap;
|
||||||
userMap[userToMap] = existingUsers[owner.email].realId;
|
userMap[userToMap] = existingUsers[owner.email].realId;
|
||||||
|
} else if (userToMap === 0) {
|
||||||
|
// CASE: external context
|
||||||
|
userMap[userToMap] = '0';
|
||||||
} else {
|
} else {
|
||||||
throw new errors.DataImportError(
|
throw new errors.DataImportError(
|
||||||
i18n.t('errors.data.import.utils.dataLinkedToUnknownUser', {userToMap: userToMap}), 'user.id', userToMap
|
i18n.t('errors.data.import.utils.dataLinkedToUnknownUser', {userToMap: userToMap}), 'user.id', userToMap
|
||||||
|
|
Loading…
Add table
Reference in a new issue