Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix ZeroDivisionError in TaskModel admin #133

Merged
merged 1 commit into from
Nov 20, 2023
Merged

Bugfix ZeroDivisionError in TaskModel admin #133

merged 1 commit into from
Nov 20, 2023

Conversation

jedie
Copy link
Collaborator

@jedie jedie commented Nov 20, 2023

e.g.:

  File ".../site-packages/huey_monitor/models.py", line 124, in human_percentage
    return percentage(num=self.progress_count, total=self.total)
  File ".../site-packages/huey_monitor/humanize.py", line 51, in percentage
    frac = num / total

Exception Type: ZeroDivisionError at /admin/huey_monitor/taskmodel/
Exception Value: division by zero

huey_monitor/humanize.py Outdated Show resolved Hide resolved
e.g.:
```
  File ".../site-packages/huey_monitor/models.py", line 124, in human_percentage
    return percentage(num=self.progress_count, total=self.total)
  File ".../site-packages/huey_monitor/humanize.py", line 51, in percentage
    frac = num / total

Exception Type: ZeroDivisionError at /admin/huey_monitor/taskmodel/
Exception Value: division by zero
```
@phihag phihag merged commit 871b868 into main Nov 20, 2023
9 of 12 checks passed
@phihag phihag deleted the fix-humanize branch November 20, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants