mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
Cleaned up unused Post.statusScratch property (#18817)
no issue - remnant from earlier code that is no longer needed/used
This commit is contained in:
parent
9259d0cc01
commit
b9c2989325
@ -475,8 +475,6 @@ export default class LexicalEditorController extends Controller {
|
|||||||
try {
|
try {
|
||||||
let post = yield this._savePostTask.perform({...options, adapterOptions});
|
let post = yield this._savePostTask.perform({...options, adapterOptions});
|
||||||
|
|
||||||
post.set('statusScratch', null);
|
|
||||||
|
|
||||||
// Clear any error notification (if any)
|
// Clear any error notification (if any)
|
||||||
this.notifications.clearAll();
|
this.notifications.clearAll();
|
||||||
|
|
||||||
|
@ -136,10 +136,6 @@ export default Model.extend(Comparable, ValidationEngine, {
|
|||||||
lexicalScratch: null,
|
lexicalScratch: null,
|
||||||
titleScratch: 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
|
// For use by date/time pickers - will be validated then converted to UTC
|
||||||
// on save. Updated by an observer whenever publishedAtUTC changes.
|
// on save. Updated by an observer whenever publishedAtUTC changes.
|
||||||
// Everything that revolves around publishedAtUTC only cares about the saved
|
// Everything that revolves around publishedAtUTC only cares about the saved
|
||||||
|
@ -183,7 +183,7 @@ export default BaseValidator.create({
|
|||||||
|
|
||||||
// don't validate the date if the time format is incorrect
|
// don't validate the date if the time format is incorrect
|
||||||
if (isEmpty(model.errors.errorsFor('publishedAtBlogTime'))) {
|
if (isEmpty(model.errors.errorsFor('publishedAtBlogTime'))) {
|
||||||
let status = model.statusScratch || model.status;
|
let status = model.status;
|
||||||
let now = moment();
|
let now = moment();
|
||||||
let publishedAtBlogTZ = model.publishedAtBlogTZ;
|
let publishedAtBlogTZ = model.publishedAtBlogTZ;
|
||||||
let isInFuture = publishedAtBlogTZ.isSameOrAfter(now);
|
let isInFuture = publishedAtBlogTZ.isSameOrAfter(now);
|
||||||
|
Loading…
Reference in New Issue
Block a user