Commit fa3d6eaa authored by Marin Jankovski's avatar Marin Jankovski

Use try shorthand and check for ServiceDesk addon.

parent fe9c9415
......@@ -54,9 +54,7 @@ module Gitlab
end
def service_desk_counts
license = ::License.current
return {} if license.nil?
return {} unless license.add_on?('GitLab_ServiceDesk')
return {} unless ::License.current&.add_on?('GitLab_ServiceDesk')
projects_with_service_desk = Project.where(service_desk_enabled: true)
......
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