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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#66093] Ensure there are no error duplicates
Tobias Dillmann5325cdf7eaaa
diff --git a/app/models/acts_as_customizable/calculated_value.rb b/app/models/acts_as_customizable/calculated_value.rbindex d1c4b4d027a..fc6617e9ff8 100644--- a/app/models/acts_as_customizable/calculated_value.rb+++ b/app/models/acts_as_customizable/calculated_value.rb@@ -102,7 +102,9 @@ module ActsAsCustomizable::CalculatedValueenddef create_calculated_value_error(custom_field_id, error_code)- CalculatedValueError.create!(project: self, custom_field_id:, error_code:)+ unless CalculatedValueError.exists?(project: self, custom_field_id:, error_code:)+ CalculatedValueError.create!(project: self, custom_field_id:, error_code:)+ endenddef remove_calculated_value_errors(custom_field_ids = [])