From 6e3601469cb811ecc9e7971979b24664528295ca Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Mon, 11 Nov 2019 18:57:14 +0530 Subject: [PATCH] FIX: use correct class variable to get notification levels. --- app/models/category_user.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/category_user.rb b/app/models/category_user.rb index 6b024d57003..1d9b2bfe223 100644 --- a/app/models/category_user.rb +++ b/app/models/category_user.rb @@ -207,9 +207,9 @@ class CategoryUser < ActiveRecord::Base SiteSetting.default_categories_watching.split("|"), SiteSetting.default_categories_tracking.split("|"), SiteSetting.default_categories_watching_first_post.split("|"), - ].flatten.map { |id| [id.to_i, notification_levels[:regular]] } + ].flatten.map { |id| [id.to_i, self.notification_levels[:regular]] } - notification_levels += SiteSetting.default_categories_muted.split("|").map { |id| [id.to_i, notification_levels[:muted]] } + notification_levels += SiteSetting.default_categories_muted.split("|").map { |id| [id.to_i, self.notification_levels[:muted]] } else notification_levels = CategoryUser.where(user: guardian.user).pluck(:category_id, :notification_level) end