kopia lustrzana https://github.com/Langenfeld/py-gitea
small bugfix
rodzic
e5172d6890
commit
7536fe737d
|
@ -356,10 +356,12 @@ class Repository:
|
||||||
Returns: int
|
Returns: int
|
||||||
Accumulated time the user worked in this Repository.
|
Accumulated time the user worked in this Repository.
|
||||||
"""
|
"""
|
||||||
|
if isinstance(username, User):
|
||||||
|
username = username.username
|
||||||
results = self.gitea.requests_get(
|
results = self.gitea.requests_get(
|
||||||
Repository.REPO_USER_TIME % (self.owner.username, self.name, username)
|
Repository.REPO_USER_TIME % (self.owner.username, self.name, username)
|
||||||
)
|
)
|
||||||
return results["time"]
|
return results["time"] if results else "0"
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
""" Deletes this Repository.
|
""" Deletes this Repository.
|
||||||
|
|
Ładowanie…
Reference in New Issue