pull/1/head
fkarg 2019-05-01 13:55:10 +02:00 zatwierdzone przez Langenfeld
rodzic e5172d6890
commit 7536fe737d
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -356,10 +356,12 @@ class Repository:
Returns: int
Accumulated time the user worked in this Repository.
"""
if isinstance(username, User):
username = username.username
results = self.gitea.requests_get(
Repository.REPO_USER_TIME % (self.owner.username, self.name, username)
)
return results["time"]
return results["time"] if results else "0"
def delete(self):
""" Deletes this Repository.