Skip to content

Commit

Permalink
Show -- for the total if the account has no mobile worker yet
Browse files Browse the repository at this point in the history
  • Loading branch information
jingcheng16 committed Dec 3, 2024
1 parent 5a77507 commit 920074e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion corehq/apps/enterprise/enterprise.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,5 +451,7 @@ def total(self):
if domain_mobile_workers:
total_mobile_workers += domain_mobile_workers
total_up_to_date += domain_mobile_workers - len(self.rows_for_domain(domain_obj))
percentage = (total_up_to_date / total_mobile_workers) if total_mobile_workers else 0
if not total_mobile_workers:
return '--'
percentage = (total_up_to_date / total_mobile_workers)
return f"{percentage * 100:.0f}%"

0 comments on commit 920074e

Please sign in to comment.