Fixed precondition failed message which was trying to dereference nil.
This commit is contained in:
parent
add2d223a6
commit
d7badc8402
2 changed files with 2 additions and 3 deletions
|
@ -307,8 +307,7 @@ class Relation < ActiveRecord::Base
|
|||
|
||||
# and check that it is OK to use.
|
||||
unless element and element.visible? and element.preconditions_ok?
|
||||
raise OSM::APIPreconditionFailedError.new("Relation with id #{self.id} cannot be saved due to #{m[0]} with id #{element.id}")
|
||||
return false
|
||||
raise OSM::APIPreconditionFailedError.new("Relation with id #{self.id} cannot be saved due to #{m[0]} with id #{m[1]}")
|
||||
end
|
||||
hash[m[1]] = true
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue