Skip to content

Commit

Permalink
修改为从配置文件中获取这个app_code (#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lawrence-lkq authored Jun 12, 2024
1 parent 1c9ea12 commit 8125a3e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from typing import Any, List

from blue_krill.async_utils.django_utils import apply_async_on_commit
from django.conf import settings
from django.db import transaction
from django.utils.decorators import method_decorator
from django.utils.translation import gettext as _
Expand Down Expand Up @@ -70,7 +71,7 @@ def get_queryset(self):

# 仅展示资源存在的权限
resource_ids = Resource.objects.filter(gateway=self.request.gateway).values_list("id", flat=True)
return queryset.filter(gateway=self.request.gateway, resource_id__in=resource_ids)
return queryset.filter(gateway=self.request.gateway, resource_id__in=resource_ids).exclude(bk_app_code=settings.DEFAULT_TEST_APP['bk_app_code'])


@method_decorator(
Expand Down

0 comments on commit 8125a3e

Please sign in to comment.