diff --git a/app/assets/javascripts/discourse/controllers/edit-topic-status-update.js.es6 b/app/assets/javascripts/discourse/controllers/edit-topic-status-update.js.es6 index de3b147324e..3dbeddeca51 100644 --- a/app/assets/javascripts/discourse/controllers/edit-topic-status-update.js.es6 +++ b/app/assets/javascripts/discourse/controllers/edit-topic-status-update.js.es6 @@ -59,6 +59,11 @@ export default Ember.Controller.extend(ModalFunctionality, { return Ember.isEmpty(updateTime) || updateTimeInvalid || loading; }, + @computed("model.visible") + excludeCategoryId(visible) { + if (visible) return this.get('model.category_id'); + }, + @observes("topicStatusUpdate.execute_at", "topicStatusUpdate.duration") _setUpdateTime() { let time = null; diff --git a/app/assets/javascripts/discourse/templates/modal/edit-topic-status-update.hbs b/app/assets/javascripts/discourse/templates/modal/edit-topic-status-update.hbs index 60e417f607c..8fca98f4132 100644 --- a/app/assets/javascripts/discourse/templates/modal/edit-topic-status-update.hbs +++ b/app/assets/javascripts/discourse/templates/modal/edit-topic-status-update.hbs @@ -58,7 +58,7 @@ {{else if publishToCategory}}
- {{category-chooser valueAttribute="id" value=categoryId excludeCategoryId=model.category_id}} + {{category-chooser valueAttribute="id" value=categoryId excludeCategoryId=excludeCategoryId}}
{{auto-update-input