lib/osm/api_access.rb in osm-0.1.1 vs lib/osm/api_access.rb in osm-0.1.2
- old
+ new
@@ -49,10 +49,10 @@
# Rubyify permissions hash
attributes[:permissions].keys.each do |old_key|
new_key = (old_key.to_sym rescue old_key) # Get symbol of the key
attributes[:permissions][new_key] = attributes[:permissions].delete(old_key) # Change the key
- attributes[:permissions][new_key] = permissions_map[attributes[:permissions][new_key].to_i] # Translate permissions value
+ attributes[:permissions][new_key] = permissions_map[attributes[:permissions][new_key].to_i] || [] # Translate permissions value
end
attributes[:permissions].freeze
this_item = new(attributes)
result.push this_item