mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
82bb3aaea1
no issue - if you import a JSON file with a post, which has an unknown author, the target user was removed from the blog - Ghost can handle this case and still succeeds with import - but we have stored an `author_id` in the database, which does not map to any user and won't map in the future - this can trouble if we add support for multiple authors - currently, we only return the `author_id` to the client and the client can map with `author_id` with users fetched by the API - if it does not find a user, it just falls back to a different user - but multiple authors have to be included explicit (`include=authors`) and we will return a mapped (author_id => user) result - it won't be able to find the user, because we lookup the database - this would result in an error - there is in general no reason to import (or store) an unknown/invalid `author_id` into the database - on import, we show you a warning and you can choose a different author if you want - solution: fallback to owner user and extend warning - it's not a behaviour change, you still can import unknown author id's and the import won't fail - but we ensure valid author id's - updated test - further more: returning `author={}` when requesting `include=author` could trouble with ember currently - it expects the author to be returned |
||
---|---|---|
.. | ||
api | ||
data/importer/importers | ||
model | ||
export_spec.js | ||
migration_spec.js | ||
update_check_spec.js |