mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 10:42:45 +08:00
BUGFIX: ensure topic_view exists before attempting to access it
This commit is contained in:
parent
8a4b603bfd
commit
750d3a6b18
|
@ -77,7 +77,7 @@ class PostSerializer < BasicPostSerializer
|
|||
end
|
||||
|
||||
def primary_group_name
|
||||
return nil unless object.user
|
||||
return nil unless object.user && @topic_view
|
||||
return @topic_view.primary_group_names[object.user.primary_group_id] if object.user.primary_group_id
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user