1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

rest_api: deprecated sometimes isn't present?

This commit is contained in:
Salamandar 2024-03-09 14:26:23 +01:00
parent d7009bd283
commit 5c1f202877

View file

@ -151,7 +151,7 @@ class GitlabAPI:
def archived(self) -> bool: def archived(self) -> bool:
"""Return the archival status for the repository""" """Return the archival status for the repository"""
return self.internal_api(f"projects/{self.project_id}")["archived"] return self.internal_api(f"projects/{self.project_id}").get("archived", False)
def url_for_ref(self, ref: str, _: RefType) -> str: def url_for_ref(self, ref: str, _: RefType) -> str:
name = self.project_path.split("/")[-1] name = self.project_path.split("/")[-1]