File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1717from rest_framework import serializers , status
1818
1919from common .constants .cache_version import Cache_Version
20- from common .constants .permission_constants import ResourceAuthType , ResourcePermissionGroup , ResourcePermission
20+ from common .constants .permission_constants import ResourceAuthType , ResourcePermission
2121from common .database_model_manage .database_model_manage import DatabaseModelManage
2222from common .db .search import page_search , native_page_search
2323from common .exception .app_exception import AppApiException
@@ -474,8 +474,14 @@ def get_internal_tools(self):
474474 Q (scope = ToolScope .INTERNAL ) &
475475 Q (is_active = True )
476476 )
477-
478- return ToolModelSerializer (query_set , many = True ).data
477+ # 处理动态url
478+ prefix = CONFIG .get_admin_path ()
479+ return [
480+ {
481+ ** tool ,
482+ 'icon' : tool ['icon' ].replace ('/admin' , prefix ),
483+ } for tool in ToolModelSerializer (query_set , many = True ).data
484+ ]
479485
480486 class AddInternalTool (serializers .Serializer ):
481487 user_id = serializers .UUIDField (required = True , label = _ ("User ID" ))
You can’t perform that action at this time.
0 commit comments