X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/16f5a5ac0c674b258996fcbde1c3fda2e651906a..d82f9d12ce55a0287361ed4f93cd97e896778a35:/app/models/way.rb diff --git a/app/models/way.rb b/app/models/way.rb index d0a252803..b31ffc1d1 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -58,7 +58,7 @@ class Way < ActiveRecord::Base way.id = pt["id"].to_i # .to_i will return 0 if there is no number that can be parsed. # We want to make sure that there is no id with zero anyway - raise OSM::APIBadUserInput.new("ID of way cannot be zero when updating.") if way.id == 0 + raise OSM::APIBadUserInput.new("ID of way cannot be zero when updating.") if way.id.zero? end # We don't care about the timestamp nor the visibility as these are either