FIX: do not raise error if query does not have group_ids

This commit is contained in:
Arpit Jalan 2019-09-13 12:00:29 +05:30
parent b8c96afe83
commit 2acab3ba89
1 changed files with 1 additions and 1 deletions

View File

@ -1038,7 +1038,7 @@ SQL
format.html { render 'groups/show' }
format.json do
queries = DataExplorer::Query.all
queries.select! { |query| query.group_ids.include?(group.id.to_s) }
queries.select! { |query| query.group_ids&.include?(group.id.to_s) }
render_serialized queries, DataExplorer::QuerySerializer, root: 'queries'
end
end