perf: check_asset_permission_will_expired filter is_active=True

This commit is contained in:
feng
2025-07-29 17:43:01 +08:00
parent 1df04d2a94
commit 929a1d4ddb
2 changed files with 1 additions and 2 deletions

View File

@@ -65,6 +65,7 @@ def check_asset_permission_will_expired():
org_perm_remain_day_mapper = defaultdict(dict)
asset_perms = AssetPermission.objects.filter(
is_active=True,
date_expired__gte=start,
date_expired__lte=end
).distinct()

View File

@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
#
from users.models import User
from assets.models import SystemUser