Skip to content

Commit

Permalink
Fix pdf export with nil derived_done_ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
cbliard committed Mar 26, 2024
1 parent 18f5b95 commit 1b61525
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/work_package/exports/formatters/done_ratio.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def self.apply?(name, _export_format)

def format(work_package, **)
derived_done_ratio = work_package.derived_done_ratio
derived = derived_done_ratio > 0 ? " · Σ #{derived_done_ratio}%" : ""
derived = derived_done_ratio&.positive? ? " · Σ #{derived_done_ratio}%" : ""
"#{work_package.done_ratio}%#{derived}"
end
end
Expand Down

0 comments on commit 1b61525

Please sign in to comment.