mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:04:11 +08:00
need to allow for now scope
This commit is contained in:
parent
60ba9dcc5e
commit
3f67f91d27
|
@ -72,7 +72,7 @@ class CategorySerializer < BasicCategorySerializer
|
|||
end
|
||||
|
||||
def notification_level
|
||||
user = scope.user
|
||||
user = scope && scope.user
|
||||
object.notification_level ||
|
||||
(user && CategoryUser.where(user: user, category: object).first.try(:notification_level))
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user