Merge branch 'dev' of https://github.com/jumpserver/jumpserver into pr@dev@feat_audit_view_download_replay

pull/11452/head
jiangweidong 2023-08-29 14:21:11 +08:00
commit bc217e1bad
1 changed files with 2 additions and 2 deletions

View File

@ -49,11 +49,11 @@ def migrate_assets_sftp_protocol(apps, schema_editor):
count = 0 count = 0
print("\nAsset add sftp protocol: ") print("\nAsset add sftp protocol: ")
asset_ids = asset_cls.objects\ asset_ids = list(asset_cls.objects\
.filter(platform__in=sftp_platforms)\ .filter(platform__in=sftp_platforms)\
.exclude(protocols__name='sftp')\ .exclude(protocols__name='sftp')\
.distinct()\ .distinct()\
.values_list('id', flat=True) .values_list('id', flat=True))
while True: while True:
_asset_ids = asset_ids[count:count + 1000] _asset_ids = asset_ids[count:count + 1000]
if not _asset_ids: if not _asset_ids: