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