mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-16 07:18:22 +00:00
fix: 修复 su-from-accounts API; 前端 Select2 组件初始化时 API 报错的问题;
修改原因: 前端使用 Select2 组件渲染更新账号的表单页面时,会默认先创建 spm 值, 后端调用 get_object 方法时,使用的queryset,就是spm所对应的queryset, 而 detail=True, 查询的值是当前 account_id,不在 queryset 中, 所以会导致调用父类的 get_object 方法报错,对象找不到
This commit is contained in:
@@ -8,6 +8,5 @@ from .. import api
|
||||
app_name = 'common'
|
||||
|
||||
urlpatterns = [
|
||||
path('resources/cache/',
|
||||
api.ResourcesIDCacheApi.as_view(), name='resources-cache'),
|
||||
path('resources/cache/', api.ResourcesIDCacheApi.as_view(), name='resources-cache'),
|
||||
]
|
||||
|
Reference in New Issue
Block a user