FIX: category validation in composer was still using categoryName instead of categoryId

This commit is contained in:
Neil Lalonde 2013-10-08 12:08:39 -04:00
parent 94d68d2453
commit 32af23884e

View file

@ -364,10 +364,10 @@ Discourse.ComposerView = Discourse.View.extend(Ember.Evented, {
}.property('model.titleLength', 'model.missingTitleCharacters', 'model.minimumTitleLength'),
categoryValidation: function() {
if( !Discourse.SiteSettings.allow_uncategorized_topics && !this.get('model.categoryName')) {
if( !Discourse.SiteSettings.allow_uncategorized_topics && !this.get('model.categoryId')) {
return Discourse.InputValidation.create({ failed: true, reason: I18n.t('composer.error.category_missing') });
}
}.property('model.categoryName'),
}.property('model.categoryId'),
replyValidation: function() {
var replyLength = this.get('model.replyLength'),