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

ensure method exists

ulferts94cc3fc188c2
diff --git a/app/models/query/sums.rb b/app/models/query/sums.rb
index 33fed6f3ac9..48274a5c675 100644
--- a/app/models/query/sums.rb
+++ b/app/models/query/sums.rb
@@ -99,7 +99,7 @@ module ::Query::Sums
end
def crunch(num)
- return num if num.nil? or num.integer?
+ return num if num.nil? || !num.respond_to?(:integer?) || num.integer?
Float(format('%.2f', num.to_f))
end