aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/lib/api/v4/keys.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/lib/api/v4/keys.rb b/web/lib/api/v4/keys.rb
index 4cebc82..98d60c6 100644
--- a/web/lib/api/v4/keys.rb
+++ b/web/lib/api/v4/keys.rb
@@ -34,9 +34,9 @@ class Taginfo < Sinatra::Base
}) do
if params[:filter]
- filters = params[:filter].split(',').map{ |f| @@filters[f.to_sym][:expr] }.compact
+ filters = params[:filter].split(',').map{ |f| @@filters[f.to_sym] ? @@filters[f.to_sym][:expr] : nil }.compact
elsif params[:filters] # old param name for backwards compatibility
- filters = params[:filters].split(',').map{ |f| @@filters[f.to_sym][:expr] }.compact
+ filters = params[:filters].split(',').map{ |f| @@filters[f.to_sym] ? @@filters[f.to_sym][:expr] : nil }.compact
else
filters = []
end