Fix LabelsHelper#toggle_subscription_label_path

parent e51953be
...@@ -145,10 +145,12 @@ module LabelsHelper ...@@ -145,10 +145,12 @@ module LabelsHelper
end end
def toggle_subscription_label_path(label, project) def toggle_subscription_label_path(label, project)
if label.is_a?(GroupLabel) return toggle_subscription_group_label_path(label.group, label) unless project
toggle_subscription_group_label_path(label.group, label)
else case label_subscription_status(label, project)
toggle_subscription_namespace_project_label_path(project.namespace, project, label) when 'group-level' then toggle_subscription_group_label_path(label.group, label)
when 'project-level' then toggle_subscription_namespace_project_label_path(project.namespace, project, label)
when 'unsubscribed' then toggle_subscription_namespace_project_label_path(project.namespace, project, label)
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