aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/lib/ui/relation.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/lib/ui/relation.rb b/web/lib/ui/relation.rb
index d2df9cc..e2cd5fd 100644
--- a/web/lib/ui/relation.rb
+++ b/web/lib/ui/relation.rb
@@ -36,8 +36,8 @@ class Taginfo < Sinatra::Base
sum = { 'nodes' => 0, 'ways' => 0, 'relations' => 0 }
@db.select("SELECT * FROM db.relation_roles WHERE rtype=? ORDER BY count_all DESC", @rtype).execute() do |row|
%w( nodes ways relations ).each do |type|
- count = row["count_#{ type }"]
- if row['count_all'] < sum_count_all * 0.01
+ count = row["count_#{ type }"].to_i
+ if row['count_all'].to_i < sum_count_all * 0.01
sum[type] += count
else
@roles << { :role => row['role'], :type => type, :value => count }