Commit 2d283dd4 authored by Małgorzata Ksionek's avatar Małgorzata Ksionek

Add guard clause

parent 3459ba13
......@@ -23,6 +23,8 @@ module Gitlab
end
def median
return if @project.nil?
BatchLoader.for(@project.id).batch(key: name) do |project_ids, loader|
if project_ids.one?
loader.call(@project.id, median_query(project_ids))
......
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