Put the guard clause back on GeoNode::project_ids

parent cc3cbb87
...@@ -109,9 +109,10 @@ class GeoNode < ActiveRecord::Base ...@@ -109,9 +109,10 @@ class GeoNode < ActiveRecord::Base
end end
def project_ids def project_ids
namespaces.flat_map { |namespace| namespace.all_projects.select(:id).pluck(:id) } return unless namespaces.presence
.uniq
.presence namespaces.flat_map { |namespace| namespace.all_projects.select(:id).pluck(:id) }.uniq
end
end end
private private
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment