Skip to content

Commit 4f4565f

Browse files
authored
fix: Shared workspace permission control error (#3548)
1 parent 4d87e01 commit 4f4565f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/tools/serializers/tool.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ def is_one_valid(self, *, raise_exception=False):
296296
if not query_set.exists():
297297
get_authorized_tool = DatabaseModelManage.get_model('get_authorized_tool')
298298
if get_authorized_tool:
299-
return get_authorized_tool(QuerySet(Tool).filter(id=self.data.get('id')), workspace_id).exists()
299+
if not get_authorized_tool(QuerySet(Tool).filter(id=self.data.get('id')), workspace_id).exists():
300+
raise AppApiException(500, _('Tool id does not exist'))
300301
raise AppApiException(500, _('Tool id does not exist'))
301302

302303
def is_valid(self, *, raise_exception=False):

0 commit comments

Comments
 (0)