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

fix(rubocop): obey linting

as-opc995abc1b9e0
diff --git a/app/models/work_package/pdf_export/work_package_detail.rb b/app/models/work_package/pdf_export/work_package_detail.rb
index f3a80b73aac..23cfa8107dd 100644
--- a/app/models/work_package/pdf_export/work_package_detail.rb
+++ b/app/models/work_package/pdf_export/work_package_detail.rb
@@ -140,7 +140,7 @@ module WorkPackage::PDFExport::WorkPackageDetail
values = cost_helper.summarized_cost_entries.map do |kvp|
cost_type = kvp[0]
volume = kvp[1]
- type_unit = volume == 1.0 ? cost_type.unit : cost_type.unit_plural
+ type_unit = volume.to_d == 1.0.to_d ? cost_type.unit : cost_type.unit_plural
"#{volume} #{type_unit}"
end
return nil if values.empty?