From eb207e2dc3baf4ee5285aae8ca2cce43711fa88a Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Thu, 12 Oct 2023 16:51:06 +0200 Subject: [PATCH] simplify user of site_group_name --- src/sites_toolbox.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/sites_toolbox.py b/src/sites_toolbox.py index 4c3e222..901f73b 100644 --- a/src/sites_toolbox.py +++ b/src/sites_toolbox.py @@ -434,19 +434,16 @@ def sites_toolbox_page(): unsafe_allow_html=True, ) else: - site_group = get_site_group_by_name( - session=session, site_group_name=site_group_name - ) user = create_user( session=session, email=email, - site_group_name=site_group.site_group_name, + site_group_name=site_group_name, ) user_details = { "email": str(user.email), - "site_group": str(site_group.site_group_name), + "site_group": str(site_group_name), "date_added": (user.created_utc.strftime("%Y-%m-%d")), } st.json(user_details)