perf: 去掉 debug msg

pull/10295/head
ibuler 2023-04-20 22:32:22 +08:00 committed by Jiangjie.Bai
parent 06052b85a2
commit eb9ac213d5
4 changed files with 3 additions and 4 deletions

View File

@ -28,7 +28,6 @@ class ChangeSecretMixin(models.Model):
default=SSHKeyStrategy.add, verbose_name=_('SSH key change strategy')
)
accounts: list[str] # account usernames
get_all_assets: callable # get all assets
class Meta:

View File

@ -3,6 +3,7 @@ from rest_framework.decorators import action
from rest_framework.response import Response
from common.api import JMSGenericViewSet
from common.permissions import IsValidUser
from assets.serializers import CategorySerializer, TypeSerializer
from assets.const import AllTypes
@ -14,7 +15,7 @@ class CategoryViewSet(ListModelMixin, JMSGenericViewSet):
'default': CategorySerializer,
'types': TypeSerializer
}
permission_classes = ()
permission_classes = (IsValidUser,)
def get_queryset(self):
return AllTypes.categories()

View File

@ -40,7 +40,6 @@ def get_platform_automation_methods(path):
continue
with open(path, 'r') as f:
print("path: ", path)
manifest = yaml_load_with_i18n(f)
check_platform_method(manifest, path)
manifest['dir'] = os.path.dirname(path)

View File

@ -123,7 +123,7 @@ class AssetPermissionSerializer(BulkOrgResourceModelSerializer):
for i in range(0, len(account_ids), slice_count):
push_accounts_to_assets_task.delay(account_ids[i:i + slice_count])
def validate_accounts(self, usernames: list[str]):
def validate_accounts(self, usernames):
template_ids = []
account_usernames = []
for username in usernames: