mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-29 16:12:55 +00:00
fix: Shared workspace permission control error (#3548)
This commit is contained in:
parent
4d87e01682
commit
4f4565f85b
|
|
@ -296,7 +296,8 @@ class ToolSerializer(serializers.Serializer):
|
|||
if not query_set.exists():
|
||||
get_authorized_tool = DatabaseModelManage.get_model('get_authorized_tool')
|
||||
if get_authorized_tool:
|
||||
return get_authorized_tool(QuerySet(Tool).filter(id=self.data.get('id')), workspace_id).exists()
|
||||
if not get_authorized_tool(QuerySet(Tool).filter(id=self.data.get('id')), workspace_id).exists():
|
||||
raise AppApiException(500, _('Tool id does not exist'))
|
||||
raise AppApiException(500, _('Tool id does not exist'))
|
||||
|
||||
def is_valid(self, *, raise_exception=False):
|
||||
|
|
|
|||
Loading…
Reference in New Issue