Skip to content

Commit e85c2b2

Browse files
committed
fix: When adding an intelligent agent, an error message appears with a string indicating duplicate names
1 parent e9ea594 commit e85c2b2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/folders/serializers/folder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def insert(self, instance, with_valid=True):
149149

150150
Folder = get_folder_type(self.data.get('source')) # noqa
151151
if QuerySet(Folder).filter(name=name, workspace_id=workspace_id, parent_id=parent_id).exists():
152-
raise serializers.ValidationError(_('Folder name already exists'))
152+
raise Exception(_('Folder name already exists'))
153153
# Folder 不能超过3层
154154
check_depth(self.data.get('source'), parent_id, workspace_id)
155155

0 commit comments

Comments
 (0)