🐛 fix(store.py): handle exception when counting components to prevent potential errors and set comp_count to 0 in case of exception
This commit is contained in:
parent
955ba95eb3
commit
f323bc4d8a
1 changed files with 8 additions and 6 deletions
|
|
@ -104,12 +104,14 @@ def get_components(
|
|||
tags=tags,
|
||||
sort=sort,
|
||||
)
|
||||
|
||||
comp_count = store_service.count_components(
|
||||
api_key=store_api_Key,
|
||||
filter_by_user=filter_by_user,
|
||||
is_component=is_component,
|
||||
)
|
||||
try:
|
||||
comp_count = store_service.count_components(
|
||||
api_key=store_api_Key,
|
||||
filter_by_user=filter_by_user,
|
||||
is_component=is_component,
|
||||
)
|
||||
except Exception:
|
||||
comp_count = 0
|
||||
|
||||
if store_api_Key:
|
||||
# Now, from the result, we need to get the components
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue