0
Fork 0
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:
Dilan Guneratne 2018-12-03 11:48:03 -05:00 committed by Katharina Irrgang
parent 7c1840f025
commit 6bc658be9b

View file

@ -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: []};
}