fix
This commit is contained in:
@@ -78,13 +78,9 @@ def batch_create(request, payload: BatchUsersIn):
|
|||||||
usernames.append(username)
|
usernames.append(username)
|
||||||
digits = [str(random.randint(2, 9)) for _ in range(6)]
|
digits = [str(random.randint(2, 9)) for _ in range(6)]
|
||||||
password = "".join(digits)
|
password = "".join(digits)
|
||||||
user_list.append(
|
user = User(username=username)
|
||||||
User(
|
user.set_password(password)
|
||||||
username=username,
|
user_list.append(user)
|
||||||
password=password,
|
|
||||||
raw_password=password,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
existing_users = User.objects.filter(username__in=usernames)
|
existing_users = User.objects.filter(username__in=usernames)
|
||||||
if existing_users.exists():
|
if existing_users.exists():
|
||||||
|
|||||||
Reference in New Issue
Block a user