From a0f419439de0c265bc5884d25e2b51ba520fb7ef Mon Sep 17 00:00:00 2001 From: Dan Zadik Date: Wed, 17 Mar 2021 17:29:47 +0000 Subject: [PATCH 1/2] Fixed User Create Bug --- GlobalBehaviorandComponents/manageusers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GlobalBehaviorandComponents/manageusers.py b/GlobalBehaviorandComponents/manageusers.py index dd24caa1..10a51b17 100644 --- a/GlobalBehaviorandComponents/manageusers.py +++ b/GlobalBehaviorandComponents/manageusers.py @@ -165,7 +165,8 @@ def gbac_user_create(): else: msg = "Error During Create - " + str(user_create_response["errorCauses"][0]["errorSummary"]) - if parent_id: + if not parent_id is not None: + logger.debug("ParentID Found") okta_admin.create_linked_users(user_create_response['id'], parent_id, linked_name) return redirect(url_for("gbac_lo_bp.gbac_linkedobjects", _external="True", _scheme=session[SESSION_INSTANCE_SETTINGS_KEY]["app_scheme"], message=msg)) From c89127533eafabae5a716c2ad5429be2c1b7bf39 Mon Sep 17 00:00:00 2001 From: Dan Zadik Date: Wed, 17 Mar 2021 17:32:23 +0000 Subject: [PATCH 2/2] Flake8 Fixes --- GlobalBehaviorandComponents/manageusers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GlobalBehaviorandComponents/manageusers.py b/GlobalBehaviorandComponents/manageusers.py index 10a51b17..8db0b4e8 100644 --- a/GlobalBehaviorandComponents/manageusers.py +++ b/GlobalBehaviorandComponents/manageusers.py @@ -165,8 +165,8 @@ def gbac_user_create(): else: msg = "Error During Create - " + str(user_create_response["errorCauses"][0]["errorSummary"]) - if not parent_id is not None: - logger.debug("ParentID Found") + if parent_id is not None: + logger.debug("ParentID Found") okta_admin.create_linked_users(user_create_response['id'], parent_id, linked_name) return redirect(url_for("gbac_lo_bp.gbac_linkedobjects", _external="True", _scheme=session[SESSION_INSTANCE_SETTINGS_KEY]["app_scheme"], message=msg))