This commit is contained in:
2025-03-07 09:40:05 +08:00
parent 3b52eb1813
commit 3c2daad1e4

View File

@@ -84,10 +84,6 @@ def batch_create(request, payload: BatchUsersIn):
user.set_password(password) user.set_password(password)
user_list.append(user) user_list.append(user)
existing_users = User.objects.filter(username__in=usernames)
if existing_users.exists():
raise HttpError(400, "有些用户已经存在,创建失败")
for user in user_list: for user in user_list:
profile_list.append(Profile(user=user)) profile_list.append(Profile(user=user))