projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2c9ea6
)
fix problem with blank areas throwing a 500
author
Richard Fairhurst
<richard@systemed.net>
Fri, 21 Mar 2008 20:17:56 +0000
(20:17 +0000)
committer
Richard Fairhurst
<richard@systemed.net>
Fri, 21 Mar 2008 20:17:56 +0000
(20:17 +0000)
app/models/relation.rb
patch
|
blob
|
history
diff --git
a/app/models/relation.rb
b/app/models/relation.rb
index 74832a7d9f1cca594d098abd98e0e755e9b35c67..0d10b77284358cd4975d8c2b7a76b7b1716c176d 100644
(file)
--- a/
app/models/relation.rb
+++ b/
app/models/relation.rb
@@
-106,6
+106,7
@@
class Relation < ActiveRecord::Base
# collect relationships. currently done in one big block at the end;
# may need to move this upwards if people want automatic completion of
# relationships, i.e. deliver referenced objects like we do with ways...
+ return [] if node_ids.empty? and node_ids.empty?
relations = Array.new
if node_ids.length > 0
relations += Relation.find_by_sql("select e.* from current_relations e,current_relation_members em where " +