X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c11d961f624cb610c4b8184d24e522b2c093d1ea..84b67e00a07262139f2cc9e9460f4afd35e91349:/app/models/node.rb?ds=sidebyside diff --git a/app/models/node.rb b/app/models/node.rb index 8b09ffef7..230c83882 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -97,7 +97,7 @@ class Node < ActiveRecord::Base user_display_name_cache = {} if user_display_name_cache.nil? - if user_display_name_cache and user_display_name_cache[self.user_id] + if user_display_name_cache and user_display_name_cache.key?(self.user_id) # use the cache if available elsif self.user.data_public? user_display_name_cache[self.user_id] = self.user.display_name