diff --git a/app/helpers/orbit_helper.rb b/app/helpers/orbit_helper.rb index 9196527..2b87dfc 100644 --- a/app/helpers/orbit_helper.rb +++ b/app/helpers/orbit_helper.rb @@ -168,7 +168,9 @@ module OrbitHelper if @current_user.is_admin? or @current_user.is_manager?(@module_app) return true else - return @current_user.approved_categories.include?cat rescue false + category = Category.find(cat) rescue nil + return false if category.nil? + return @current_user.approved_categories.include?category rescue false end end