mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat: handle empty store tools in ToolStoreDialog
This commit is contained in:
parent
823ac6b1a3
commit
bd668e7e2a
|
|
@ -766,7 +766,7 @@ class ToolSerializer(serializers.Serializer):
|
|||
os.unlink(temp_zip_path)
|
||||
except requests.RequestException as e:
|
||||
maxkb_logger.error(f"fetch appstore tools error: {e}")
|
||||
return []
|
||||
return {'apps': [], 'additionalProperties': {'tags': []}}
|
||||
|
||||
class AddStoreTool(serializers.Serializer):
|
||||
user_id = serializers.UUIDField(required=True, label=_("User ID"))
|
||||
|
|
|
|||
|
|
@ -175,6 +175,11 @@ async function getStoreToolList() {
|
|||
const tags = res.data.additionalProperties.tags
|
||||
const storeTools = res.data.apps
|
||||
|
||||
if (storeTools.length === 0) {
|
||||
filterList.value = []
|
||||
return
|
||||
}
|
||||
|
||||
categories.value = tags.map((tag: any) => ({
|
||||
id: tag.key,
|
||||
title: tag.name, // 国际化
|
||||
|
|
|
|||
Loading…
Reference in New Issue