fixed forks数负数处理

This commit is contained in:
xxq250 2024-11-13 16:01:03 +08:00
parent fba2c4bf33
commit d2c859681b
1 changed files with 2 additions and 0 deletions

View File

@ -501,6 +501,8 @@ def calculate(request):
stars = software_detail.get("praises_count", 0)
watching = software_detail.get("watchers_count", 0)
forks = software_detail.get("forked_count", 0)
if forks < 0:
forks = 0
commits_number = commits.get("total_count")
average_day_interval = software_detail.get("average_day_interval", 0)
readme = software_detail.get("readme", False)