mirror of
https://github.com/csd4ni3l/siege-calendar.git
synced 2026-01-01 04:23:47 +01:00
Fix crash if no time exists
This commit is contained in:
@@ -39,7 +39,7 @@ class Client:
|
||||
response = self.request(f"/users/my/stats?start_date={start_date}&end_date={end_date}&features=projects,languages")["data"]
|
||||
|
||||
if not response.get("languages"): # no time for range, prevent crash
|
||||
return None, 0
|
||||
return 'None', [], 'None', [], "None", 0, "None", 0
|
||||
|
||||
top_language = response["languages"][0]["name"]
|
||||
top_project = response["projects"][0]["name"]
|
||||
|
||||
Reference in New Issue
Block a user