Fixed creation of passwords for Netbox 2.9

This commit is contained in:
Tobias Genannt 2020-08-24 11:00:48 +02:00
parent 9fae2b0f74
commit 3ace32dfc2

View File

@ -12,7 +12,7 @@ for username, user_details in users.items():
if not User.objects.filter(username=username): if not User.objects.filter(username=username):
user = User.objects.create_user( user = User.objects.create_user(
username = username, username = username,
password = user_details.get('password', 0) or User.objects.make_random_password) password = user_details.get('password', 0) or User.objects.make_random_password())
print("👤 Created user",username) print("👤 Created user",username)