Put the guard clause back on GeoNode::project_ids

parent cc3cbb87
......@@ -109,9 +109,10 @@ class GeoNode < ActiveRecord::Base
end
def project_ids
namespaces.flat_map { |namespace| namespace.all_projects.select(:id).pluck(:id) }
.uniq
.presence
return unless namespaces.presence
namespaces.flat_map { |namespace| namespace.all_projects.select(:id).pluck(:id) }.uniq
end
end
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