fix: 解锁ip失败问题 (#11611)

Co-authored-by: feng <1304903146@qq.com>
pull/11614/head
fit2bot 2023-09-19 17:38:46 +08:00 committed by GitHub
parent b8fb23a0a0
commit 58592a13e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -53,7 +53,6 @@ class UnlockIPSecurityAPI(CreateAPIView):
def create(self, request, *args, **kwargs):
ips = request.data.get('ips')
prefix = LoginIpBlockUtil.BLOCK_KEY_TMPL.replace('{}', '')
for ip in ips:
LoginIpBlockUtil(f'{prefix}{ip}').clean_block_if_need()
LoginIpBlockUtil(ip).clean_block_if_need()
return Response(status=200)