🐛 fix(service.py): fix index out of range error when getting component in download method
This commit is contained in:
parent
90853dda96
commit
ab86ddc38a
1 changed files with 1 additions and 1 deletions
|
|
@ -106,7 +106,7 @@ class StoreService(Service):
|
||||||
def download(self, api_key: str, id: str) -> ComponentResponse:
|
def download(self, api_key: str, id: str) -> ComponentResponse:
|
||||||
url = f"{self.components_url}/{id}"
|
url = f"{self.components_url}/{id}"
|
||||||
params = {"fields": ",".join(["id", "name", "description", "data"])}
|
params = {"fields": ",".join(["id", "name", "description", "data"])}
|
||||||
component = self._get(url, api_key, params)[0]
|
component = self._get(url, api_key, params)
|
||||||
return ComponentResponse(**component)
|
return ComponentResponse(**component)
|
||||||
|
|
||||||
def upload(self, api_key: str, component_data: Dict[str, Any]) -> ComponentResponse:
|
def upload(self, api_key: str, component_data: Dict[str, Any]) -> ComponentResponse:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue