mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-01-29 21:51:31 +00:00
perf(project): 优化命名的风格 (#5693)
perf: 修改错误的地 perf: 优化写错的几个 Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
@@ -108,11 +108,11 @@ class IDSpmFilter(filters.BaseFilterBackend):
|
||||
spm = request.query_params.get('spm')
|
||||
if not spm:
|
||||
return queryset
|
||||
cache_key = const.KEY_CACHE_RESOURCES_ID.format(spm)
|
||||
resources_id = cache.get(cache_key)
|
||||
if resources_id is None or not isinstance(resources_id, list):
|
||||
cache_key = const.KEY_CACHE_RESOURCE_IDS.format(spm)
|
||||
resource_ids = cache.get(cache_key)
|
||||
if resource_ids is None or not isinstance(resource_ids, list):
|
||||
return queryset
|
||||
queryset = queryset.filter(id__in=resources_id)
|
||||
queryset = queryset.filter(id__in=resource_ids)
|
||||
return queryset
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user