end
else
# otherwise, manually go to the db to check things
- if nd.node.visible? and nd.node.visible?
+ if nd.node and nd.node.visible?
ordered_nodes[nd.sequence_id] = nd.node_id.to_s
end
end
check_consistency(self, new_way, user)
if self.visible
if RelationMember.find(:first, :joins => "INNER JOIN current_relations ON current_relations.id=current_relation_members.id",
- :conditions => [ "visible = 1 AND member_type='way' and member_id=? ", self.id])
+ :conditions => [ "visible = ? AND member_type='way' and member_id=? ", true, self.id])
raise OSM::APIPreconditionFailedError
else
self.changeset_id = new_way.changeset_id