]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
Localisation updates from https://translatewiki.net.
[rails.git] / app / models / way.rb
index 2d149863e359b12cad01bf22315a5e658ef216b9..c95a1212296acc56746aea30c7959ef0a6678db5 100644 (file)
@@ -254,7 +254,7 @@ class Way < ActiveRecord::Base
   # to IDs +id_map+.
   def fix_placeholders!(id_map, placeholder_id = nil)
     nds.map! do |node_id|
   # to IDs +id_map+.
   def fix_placeholders!(id_map, placeholder_id = nil)
     nds.map! do |node_id|
-      if node_id < 0
+      if node_id.negative?
         new_id = id_map[:node][node_id]
         raise OSM::APIBadUserInput, "Placeholder node not found for reference #{node_id} in way #{id.nil? ? placeholder_id : id}" if new_id.nil?
 
         new_id = id_map[:node][node_id]
         raise OSM::APIBadUserInput, "Placeholder node not found for reference #{node_id} in way #{id.nil? ? placeholder_id : id}" if new_id.nil?