diff options
Diffstat (limited to 'web/lib/api/v4/tag.rb')
-rw-r--r-- | web/lib/api/v4/tag.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/web/lib/api/v4/tag.rb b/web/lib/api/v4/tag.rb index 778fd4a..d05f73f 100644 --- a/web/lib/api/v4/tag.rb +++ b/web/lib/api/v4/tag.rb @@ -100,7 +100,7 @@ class Taginfo < Sinatra::Base condition('value = ?', value). get_first_value() || @db.select('SELECT png FROM db.key_distributions'). - condition('key IS NULL'). + is_null('key'). get_first_value() end @@ -120,7 +120,7 @@ class Taginfo < Sinatra::Base condition('value = ?', value). get_first_value() || @db.select('SELECT png FROM db.key_distributions'). - condition('key IS NULL'). + is_null('key'). get_first_value() end @@ -190,8 +190,7 @@ class Taginfo < Sinatra::Base end @db.select('SELECT * FROM db.tags'). - condition('key = ?', key). - condition('value = ?', value). + condition('key = ? AND value = ?', key, value). execute() do |row| ['all', 'nodes', 'ways', 'relations'].each_with_index do |type, n| out[n] = { |