X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c11d961f624cb610c4b8184d24e522b2c093d1ea..3c79240a6ab23e4103826dd1cec7a12a19e948db:/app/models/segment.rb diff --git a/app/models/segment.rb b/app/models/segment.rb index aa4e07887..bdb807d93 100644 --- a/app/models/segment.rb +++ b/app/models/segment.rb @@ -88,7 +88,7 @@ class Segment < 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