FIX: do not raise error if query does not have group_ids
This commit is contained in:
parent
b8c96afe83
commit
2acab3ba89
|
@ -1038,7 +1038,7 @@ SQL
|
||||||
format.html { render 'groups/show' }
|
format.html { render 'groups/show' }
|
||||||
format.json do
|
format.json do
|
||||||
queries = DataExplorer::Query.all
|
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'
|
render_serialized queries, DataExplorer::QuerySerializer, root: 'queries'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue