0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Corrected misleading comment

no issue

- Changed not used to deprecated as author attribute is still being used
This commit is contained in:
Nazar Gargol 2018-10-05 09:48:26 +02:00
parent 959912eca3
commit 55e6c53e2a

View file

@ -177,7 +177,7 @@ module.exports.extendModel = function extendModel(Post, Posts, ghostBookshelf) {
delete attrs.author_id;
} else {
// CASE: we return `post.author=id` with or without requested columns.
// @NOTE: this serialization should be moved into api layer, it's not being moved as it's not used
// @NOTE: this serialization should be moved into api layer, it's not being moved as it's deprecated
if (!options.columns || (options.columns && options.columns.indexOf('author') !== -1)) {
attrs.author = attrs.author_id;
delete attrs.author_id;