diff --git a/apps/perms/tasks.py b/apps/perms/tasks.py index f52348060..1788a7cea 100644 --- a/apps/perms/tasks.py +++ b/apps/perms/tasks.py @@ -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() diff --git a/apps/terminal/hands.py b/apps/terminal/hands.py index 6f4c6c78f..b05681258 100644 --- a/apps/terminal/hands.py +++ b/apps/terminal/hands.py @@ -1,5 +1,3 @@ # -*- coding: utf-8 -*- # -from users.models import User -from assets.models import SystemUser