Skip to content

Commit

Permalink
fix: Handle when entity_type not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Sep 30, 2024
1 parent 376da2e commit 14f29f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ai/backend/manager/container_registry/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ async def fetch_repositories(
) -> AsyncIterator[str]:
username = self.registry_info.username
access_token = self.registry_info.password
entity_type = self.registry_info.extra.get("entity_type")
entity_type = self.registry_info.extra.get("entity_type", None)

if entity_type is None:
raise RuntimeError("Entity type is not provided for GitHub registry!")

base_url = f"https://api.github.com/{entity_type}/{username}/packages"

Expand Down

0 comments on commit 14f29f8

Please sign in to comment.