Skip to content

Commit 63abffe

Browse files
committed
feat: add label field to tool serializer and SQL queries
1 parent e13bd09 commit 63abffe

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

apps/tools/serializers/tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class ToolModelSerializer(serializers.ModelSerializer):
102102
class Meta:
103103
model = Tool
104104
fields = ['id', 'name', 'icon', 'desc', 'code', 'input_field_list', 'init_field_list', 'init_params',
105-
'scope', 'is_active', 'user_id', 'template_id', 'workspace_id', 'folder_id', 'tool_type',
105+
'scope', 'is_active', 'user_id', 'template_id', 'workspace_id', 'folder_id', 'tool_type', 'label',
106106
'create_time', 'update_time']
107107

108108

apps/tools/sql/list_tool.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ from (select tool."id"::text,
1010
tool."user_id",
1111
"user".nick_name as "nick_name",
1212
tool."icon",
13+
tool.label,
1314
tool."template_id"::text,
1415
tool."create_time",
1516
tool."update_time",
@@ -30,6 +31,7 @@ from (select tool."id"::text,
3031
tool_folder."user_id",
3132
"user".nick_name as "nick_name",
3233
'' as "icon",
34+
'' as label,
3335
'' as "template_id",
3436
tool_folder."create_time",
3537
tool_folder."update_time",

0 commit comments

Comments
 (0)