FIX: Protection against dangling category group records

This commit is contained in:
Robin Ward 2018-06-04 15:43:26 -04:00
parent 6024fb84cc
commit fab59c66f0
1 changed files with 3 additions and 1 deletions

View File

@ -310,8 +310,10 @@ 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|
if category_group.group.present?
hash[category_group.group_name] = category_group.permission_type hash[category_group.group_name] = category_group.permission_type
end end
end
hash hash
end end