From 95de4f58df32ec7b860bbcb05eedc0cb1cab631a Mon Sep 17 00:00:00 2001 From: Rajaditya Chauhan Date: Wed, 22 Nov 2023 15:17:36 +0530 Subject: [PATCH] feat(rbac_populate.py): fixing column name --- opl/rbac_populate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opl/rbac_populate.py b/opl/rbac_populate.py index b38e435..a84d787 100644 --- a/opl/rbac_populate.py +++ b/opl/rbac_populate.py @@ -181,7 +181,7 @@ def create_principal(cursor, account): user_type = "user" logging.info(f"Creating principal username = {user_name}") cursor.execute( - "INSERT INTO public.management_principal (uuid, username, tenant_id) VALUES (%s, %s, (SELECT id FROM public.api_tenant WHERE tenant_name = 'acct' || %s), %s) RETURNING id", + "INSERT INTO public.management_principal (uuid, username, tenant_id, type) VALUES (%s, %s, (SELECT id FROM public.api_tenant WHERE tenant_name = 'acct' || %s), %s) RETURNING id", (user_uuid, user_name, account, user_type), ) user_id = cursor.fetchone()[0]