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

[#64348] Remove redundant returns

Tobias Dillmanncc610c153a4f
diff --git a/app/models/custom_field/calculated_value.rb b/app/models/custom_field/calculated_value.rb
index 1a2b64dfe69..94da6578a97 100644
--- a/app/models/custom_field/calculated_value.rb
+++ b/app/models/custom_field/calculated_value.rb
@@ -56,10 +56,7 @@ module CustomField::CalculatedValue
unless valid_formula_syntax?
errors.add(:formula, :invalid)
- return
end
-
- true
end
def formula=(value)
@@ -97,10 +94,7 @@ module CustomField::CalculatedValue
if surplus_cfs.any?
custom_field_names = CustomField.where(id: surplus_cfs).pluck(:name)
errors.add(:formula, :invalid_custom_fields, custom_fields: custom_field_names.join(", "))
- return
end
-
- true
end
private