Skip to content

Commit

Permalink
fix: accept registry_url from api
Browse files Browse the repository at this point in the history
  • Loading branch information
hfudev committed Oct 1, 2024
1 parent cb6b08a commit cc9fa7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions idf_component_tools/registry/api_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ class OptionalDependencyResponse(ApiBaseModel):
class DependencyResponse(ApiBaseModel):
spec: str
source: str
name: t.Optional[str] = None # type: ignore
namespace: t.Optional[str] = None # type: ignore
registry_url: t.Optional[str] = None
name: t.Optional[str] = None
namespace: t.Optional[str] = None
is_public: bool = False
require: bool = False
rules: t.List[OptionalDependencyResponse] = []
Expand Down
3 changes: 2 additions & 1 deletion idf_component_tools/registry/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def version_dependencies(self, version: t.Dict[str, t.Any]) -> t.List[ComponentR
if source_str == 'idf':
dependency['name'] = 'idf'
elif source_str == 'service':
dependency['registry_url'] = IDF_COMPONENT_REGISTRY_URL
if dependency.get('registry_url', None) is None:
dependency['registry_url'] = IDF_COMPONENT_REGISTRY_URL
else:
raise ValueError('Unknown source type, Internal error')

Expand Down

0 comments on commit cc9fa7e

Please sign in to comment.