Commit 28e95f25 authored by Lucas Zampieri's avatar Lucas Zampieri

Updated Label subscription field to work with project and group API

Fixed a bug were group label were returning subscription false even
on subscribed labels.
Duplicated the logic from labels_helper.rb label_subscription_status()
Changelog: fixed
Signed-off-by: default avatarLucas Zampieri <lzampier@redhat.com>
parent 25bf1cbb
...@@ -18,7 +18,12 @@ module API ...@@ -18,7 +18,12 @@ module API
end end
expose :subscribed do |label, options| expose :subscribed do |label, options|
label.subscribed?(options[:current_user], options[:parent]) if label.subscribed?(options[:current_user]) ||
label.subscribed?(options[:current_user], options[:parent])
true
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