Fixed unintended save for published post on tier change

no refs

- selecting a tier in post access for a published post was also triggering a save which is not intended
- save should happen only for a draft post when changing tier for post access
This commit is contained in:
Rishabh 2021-10-04 13:02:45 +05:30
parent 230d99767f
commit bb79ff7a9a

View File

@ -148,7 +148,7 @@ export default Component.extend({
try {
await this.post.validate({property: 'visibility'});
await this.post.validate({property: 'visibilityFilter'});
if (this.post.changedAttributes().visibilityFilter) {
if (this.post.get('isDraft') && this.post.changedAttributes().visibilityFilter) {
await this.savePostTask.perform();
}
} catch (e) {