Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改为从配置文件中获取这个app_code #689

Merged
merged 5 commits into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading