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:
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
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue