From 1725a9b8028a9ffa108dc8ef38dd9c629dd6ace5 Mon Sep 17 00:00:00 2001 From: KF7EEL Date: Mon, 21 Feb 2022 09:37:19 -0800 Subject: [PATCH] fix APRS settings dict on add user --- web/app.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/app.py b/web/app.py index a78931b..03b0e38 100644 --- a/web/app.py +++ b/web/app.py @@ -6616,11 +6616,18 @@ Name: ''' + p.name + '''  -  Port: ''' + str( except Exception as e: aprs_dict[i[0]] = """[{'call': '""" + str(user.username).upper() + """'}, {'ssid': ''}, {'icon': ''}, {'comment': ''}, {'pin': ''}, {'APRS': False}]""" print(e) + new_aprs = aprs_dict.copy() + for s in aprs_dict: + for i in radioid_data[0].items(): + if i[0] == s: + pass + elif i[0] != s: + new_aprs[i[0]] = """[{'call': '""" + str(request.form.get('username')).upper() + """'}, {'ssid': ''}, {'icon': ''}, {'comment': ''}, {'pin': ''}, {'APRS': False}]""" user = User( username=request.form.get('username'), email=request.form.get('email'), email_confirmed_at=datetime.datetime.utcnow(), - aprs = str(aprs_dict), + aprs = str(new_aprs), password=user_manager.hash_password(request.form.get('password')), dmr_ids = str(radioid_data[0]), initial_admin_approved = True,