Handle segments which do not exist correctly and indicate that the
preconditions for the way are not met.
This commit is contained in:
parent
efc4c6f85d
commit
3b751f79b8
1 changed files with 1 additions and 1 deletions
|
@ -189,7 +189,7 @@ class Way < ActiveRecord::Base
|
|||
def preconditions_ok?
|
||||
return false if self.segs.empty?
|
||||
self.segs.each do |n|
|
||||
segment = Segment.find(n)
|
||||
segment = Segment.find(:first, :conditions => ["id = ?", n])
|
||||
unless segment and segment.visible and segment.preconditions_ok?
|
||||
return false
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue