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 ...@@ -18,11 +18,9 @@ module API
end end
expose :subscribed do |label, options| expose :subscribed do |label, options|
if label.subscribed?(options[:current_user]) || label.subscribed?(options[:current_user], options[:parent]) label.subscribed?(options[:current_user]) || (
true options[:parent].is_a?(::Project) && label.subscribed?(options[:current_user], options[:parent])
else )
false
end
end end
end 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