From 51a5f7e9adc6c1e34855c46776e8ebb6fd85459f Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Mon, 20 Jan 2020 17:23:40 -0800 Subject: [PATCH] Use getattr in user creation --- amanuensis/user.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/amanuensis/user.py b/amanuensis/user.py index 55d2a86..eedb03a 100644 --- a/amanuensis/user.py +++ b/amanuensis/user.py @@ -95,11 +95,11 @@ def create_user(username, displayname, email): # Fill out the new user with config.json_rw(user_dir, 'config.json') as cfg: - cfg['uid'] = uid - cfg['username'] = username - cfg['displayname'] = displayname - cfg['email'] = email - cfg['created'] = int(time.time()) + cfg.uid = uid + cfg.username = username + cfg.displayname = displayname + cfg.email = email + cfg.created = int(time.time()) # Update the index with the new user with config.json_rw('user', 'index.json') as index: