From 2acab3ba89aefd93cfa3c7c06c002d628e8b696f Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Fri, 13 Sep 2019 12:00:29 +0530 Subject: [PATCH] FIX: do not raise error if query does not have group_ids --- plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index cbc7897..e73296a 100644 --- a/plugin.rb +++ b/plugin.rb @@ -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