anonymous users are nil, so need to remove the raise
(#841)
This commit is contained in:
parent
0b6348e13f
commit
5163794698
1 changed files with 0 additions and 1 deletions
|
@ -80,7 +80,6 @@ class Topic < ApplicationRecord
|
|||
end
|
||||
|
||||
def as_json(options = {})
|
||||
raise 'You must pass a user' unless options[:user].is_a? User
|
||||
super(methods: [:user_name, :user_image, :calculated_permission, :collaborator_ids])
|
||||
.merge(inmaps: inmaps(options[:user]), inmapsLinks: inmapsLinks(options[:user]),
|
||||
map_count: map_count(options[:user]), synapse_count: synapse_count(options[:user]))
|
||||
|
|
Loading…
Reference in a new issue