Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

prevent possible infinite loops by making sure not to re-use errors objects

Markus Kahl1538666c2373
diff --git a/app/services/service_result.rb b/app/services/service_result.rb
index f604cce82ca..e7b78e29293 100644
--- a/app/services/service_result.rb
+++ b/app/services/service_result.rb
@@ -184,7 +184,7 @@ class ServiceResult
if errors
errors
elsif result.respond_to?(:errors)
- result.errors
+ ActiveModel::Errors.new(self).tap { |e| e.merge! result }
else
ActiveModel::Errors.new(self)
end