FIX: Protection against dangling category group records
This commit is contained in:
parent
6024fb84cc
commit
fab59c66f0
|
@ -310,7 +310,9 @@ SQL
|
||||||
def permissions_params
|
def permissions_params
|
||||||
hash = {}
|
hash = {}
|
||||||
category_groups.includes(:group).each do |category_group|
|
category_groups.includes(:group).each do |category_group|
|
||||||
hash[category_group.group_name] = category_group.permission_type
|
if category_group.group.present?
|
||||||
|
hash[category_group.group_name] = category_group.permission_type
|
||||||
|
end
|
||||||
end
|
end
|
||||||
hash
|
hash
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue