🐛 fix(service.py): fix index out of range error when getting component in download method

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-10-23 22:08:07 -03:00
commit ab86ddc38a

View file

@ -106,7 +106,7 @@ class StoreService(Service):
def download(self, api_key: str, id: str) -> ComponentResponse:
url = f"{self.components_url}/{id}"
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)
def upload(self, api_key: str, component_data: Dict[str, Any]) -> ComponentResponse: