mirror of
https://github.com/simple-login/app.git
synced 2025-02-22 23:02:55 +08:00
fix increase_percent
This commit is contained in:
parent
cbcae31288
commit
fcb18e66e8
1 changed files with 3 additions and 0 deletions
3
cron.py
3
cron.py
|
@ -271,6 +271,9 @@ def increase_percent(old, new) -> str:
|
|||
if old == 0:
|
||||
return "N/A"
|
||||
|
||||
if not old or not new:
|
||||
return "N/A"
|
||||
|
||||
increase = (new - old) / old * 100
|
||||
return f"{increase:.1f}%. Delta: {new - old}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue