Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Commit 45ba7f7

Browse files
authored
project_exists should not fail if no project exist in the org (#15)
1 parent a7b5b17 commit 45ba7f7

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

pytransifex/api.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,9 @@ def create_language(
238238
@ensure_login
239239
def project_exists(self, project_slug: str) -> bool:
240240
"""Check if the project exists in the remote Transifex repository"""
241-
if self.projects:
242-
if self.projects.get(slug=project_slug):
243-
return True
244-
return False
245-
raise Exception(
246-
f"No project could be found under this organization: '{self.organization}'"
247-
)
241+
if self.projects and self.projects.get(slug=project_slug):
242+
return True
243+
return False
248244

249245
@ensure_login
250246
def ping(self) -> bool:

0 commit comments

Comments
 (0)