summaryrefslogtreecommitdiff
path: root/app/models/milestone_release.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/milestone_release.rb')
-rw-r--r--app/models/milestone_release.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/milestone_release.rb b/app/models/milestone_release.rb
index 0a6165c8254..2f2bf91e436 100644
--- a/app/models/milestone_release.rb
+++ b/app/models/milestone_release.rb
@@ -11,6 +11,10 @@ class MilestoneRelease < ApplicationRecord
def same_project_between_milestone_and_release
return if milestone&.project_id == release&.project_id
+ return if milestone&.group_id
+
errors.add(:base, _('Release does not have the same project as the milestone'))
end
end
+
+MilestoneRelease.prepend_if_ee('EE::MilestoneRelease')