[openstreetmap-website] API threw unexpected NoMethodError exception: undefined method `visible?' for nil:NilClass (#654)
Shaun McDonald
notifications at github.com
Wed Dec 11 10:08:20 UTC 2013
When using extracts I make the following change to the rails code, which means that relation won't be guaranteed to be valid. It's great, but for some purposes it'll work:
```
@@ -137,7 +137,7 @@ def to_xml_node(visible_members = nil, changeset_cache = {}, user_display_name_c
end
else
# otherwise, manually go to the db to check things
- if member.member.visible?
+ if member.member && member.member.visible?
p=1
end
end
```
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/654#issuecomment-30307996
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20131211/c5cafe29/attachment.html>
More information about the rails-dev
mailing list