Ghost/ghost/admin/app/models/post-revision.js
Ronald Langeveld 77e3b3e947
🐛 Fixed page revision returning empty array on update and restore (#17042)
closes https://github.com/TryGhost/Team/issues/3491

- the `PostRevisionModel` had a `belongsTo` relation to Post which resulted in the Page model returning an empty array in the `post_revisions` property.
- Simply removing it fixed it. refs https://ghost.slack.com/archives/C02G9E68C/p1686912389383579?thread_ts=1686909240.034419&cid=C02G9E68C
2023-06-16 13:24:02 +02:00

14 lines
392 B
JavaScript

import Model, {attr, belongsTo} from '@ember-data/model';
export default class PostRevisionModel extends Model {
@attr('string') lexical;
@attr('string') title;
@attr('string') featureImage;
@attr('string') featureImageAlt;
@attr('string') featureImageCaption;
@attr('string') reason;
@attr('moment-utc') createdAt;
@belongsTo('user') author;
@attr('string') postStatus;
}