Commit 07d9f424 authored by Lucas Zampieri's avatar Lucas Zampieri

Simplified bollean condition; Added project check

title.
Signed-off-by: default avatarLucas Zampieri <lzampier@redhat.com>
parent aa79e222
......@@ -18,11 +18,9 @@ module API
end
expose :subscribed do |label, options|
if label.subscribed?(options[:current_user]) || label.subscribed?(options[:current_user], options[:parent])
true
else
false
end
label.subscribed?(options[:current_user]) || (
options[:parent].is_a?(::Project) && label.subscribed?(options[:current_user], options[:parent])
)
end
end
end
......
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