summaryrefslogtreecommitdiff
path: root/app/models/project_label.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project_label.rb')
-rw-r--r--app/models/project_label.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project_label.rb b/app/models/project_label.rb
index dc647901b46..05d7b7429ff 100644
--- a/app/models/project_label.rb
+++ b/app/models/project_label.rb
@@ -23,6 +23,10 @@ class ProjectLabel < Label
super(project, target_project: target_project, format: format, full: full)
end
+ def preloaded_parent_container
+ association(:project).loaded? ? project : parent_container
+ end
+
private
def title_must_not_exist_at_group_level