Skip to content

Commit 53ffd34

Browse files
author
mbrill-nt
committed
hotfix
1 parent 4315b9e commit 53ffd34

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

script/grafana.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ def create_user_with_random_pw(user):
5454
Creates a user from a dictionary resembling a user. Generates a random alphanumerical String as password.
5555
:param user: The dictionary off of which the user should be created.
5656
"""
57-
user["password"] = get_random_alphanumerical()
58-
user["OrgId"] = 1
57+
user_dict = dict(user)
58+
user_dict["password"] = get_random_alphanumerical()
59+
user_dict["OrgId"] = 1
5960
if configuration.DRY_RUN:
60-
print("Would have created user with json %s" % str(user))
61+
print("Would have created user with json %s" % str(user_dict))
6162
else:
62-
grafana_api.admin.create_user(user)
63+
grafana_api.admin.create_user(user_dict)
6364

6465

6566
def delete_user_by_login(login):

0 commit comments

Comments
 (0)