Commit 558d53ee authored by azul's avatar azul

Merge branch '295-bug-in-namespace-function' into 'master'

Fix: no nil values in group list

Closes #295

See merge request !282
parents ef2c6157 5d4cfa2a
......@@ -50,7 +50,7 @@ module Group::Groups
ids = [ids] unless ids.is_a? Array
return [] unless ids.any?
parentids = parent_ids(ids)
(ids + parentids + committee_ids(ids + parentids)).flatten.uniq
(ids + parentids + committee_ids(ids + parentids)).flatten.uniq.compact
# returns an array of committee ids given an array of group ids.
......@@ -59,7 +59,7 @@ module Group::Groups
def parent_ids(ids)
Group.where(id: ids).pluck(:parent_id)
Group.where(id: ids).pluck(:parent_id).compact
def can_have_committees?
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