0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Removed redundant page attribute deletion

refs https://github.com/TryGhost/Toolbox/issues/332

- 'page' property has been dropped completely from the database schema, so there's no need to clean up this model property in the output serializer
This commit is contained in:
Naz 2022-05-17 16:46:45 +08:00 committed by naz
parent 214949fe8c
commit acb3e25ef0

View file

@ -73,8 +73,6 @@ const post = (attrs, frame) => {
const columns = frame && frame.options && frame.options.columns || null;
const fields = frame && frame.original && frame.original.query && frame.original.query.fields || null;
if (localUtils.isContentAPI(frame)) {
// @TODO: https://github.com/TryGhost/Ghost/issues/10335
// delete attrs.page;
delete attrs.status;
delete attrs.email_only;
delete attrs.newsletter;
@ -103,8 +101,6 @@ const post = (attrs, frame) => {
if (columns && columns.includes('visibility') && fields && !fields.includes('visibility')) {
delete attrs.visibility;
}
} else {
delete attrs.page;
}
if (columns && columns.includes('email_segment') && fields && !fields.includes('email_segment')) {