mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
🐛Removed user reference warning from importer report if post is a draft (#10169)
refs #9584 - The Importer checks if a user reference is null. But if the post is a draft and published_by is null, we should ignore the user reference detection. - This change will avoid showing an incorrect user reference warning in the importer report for draft posts.
This commit is contained in:
parent
7c1840f025
commit
6bc658be9b
1 changed files with 5 additions and 0 deletions
|
@ -189,6 +189,11 @@ class Base {
|
|||
|
||||
// CASE: you import null, fallback to owner
|
||||
if (!obj[key]) {
|
||||
// Exception: If the imported post is a draft published_by will be null. Not a userReferenceProblem.
|
||||
if (key === 'published_by' && obj.status === 'draft') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!userReferenceProblems[obj.id]) {
|
||||
userReferenceProblems[obj.id] = {obj: _.cloneDeep(obj), keys: []};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue