Cleaned up unused Post.statusScratch property (#18817)

no issue

- remnant from earlier code that is no longer needed/used
This commit is contained in:
Kevin Ansfield 2023-11-01 11:53:29 +00:00 committed by GitHub
parent 9259d0cc01
commit b9c2989325
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 7 deletions

View File

@ -475,8 +475,6 @@ export default class LexicalEditorController extends Controller {
try {
let post = yield this._savePostTask.perform({...options, adapterOptions});
post.set('statusScratch', null);
// Clear any error notification (if any)
this.notifications.clearAll();

View File

@ -136,10 +136,6 @@ export default Model.extend(Comparable, ValidationEngine, {
lexicalScratch: null,
titleScratch: null,
// HACK: used for validation so that date/time can be validated based on
// eventual status rather than current status
statusScratch: null,
// For use by date/time pickers - will be validated then converted to UTC
// on save. Updated by an observer whenever publishedAtUTC changes.
// Everything that revolves around publishedAtUTC only cares about the saved

View File

@ -183,7 +183,7 @@ export default BaseValidator.create({
// don't validate the date if the time format is incorrect
if (isEmpty(model.errors.errorsFor('publishedAtBlogTime'))) {
let status = model.statusScratch || model.status;
let status = model.status;
let now = moment();
let publishedAtBlogTZ = model.publishedAtBlogTZ;
let isInFuture = publishedAtBlogTZ.isSameOrAfter(now);