summaryrefslogtreecommitdiff
path: root/lib/api/helpers/label_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers/label_helpers.rb')
-rw-r--r--lib/api/helpers/label_helpers.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/api/helpers/label_helpers.rb b/lib/api/helpers/label_helpers.rb
index 8572cc89e71..b3ba962666f 100644
--- a/lib/api/helpers/label_helpers.rb
+++ b/lib/api/helpers/label_helpers.rb
@@ -137,9 +137,10 @@ module API
end
def create_service_params(parent)
- if parent.is_a?(Project)
+ case parent
+ when Project
{ project: parent }
- elsif parent.is_a?(Group)
+ when Group
{ group: parent }
else
raise TypeError, 'Parent type is not supported'