From 0f44ae19090530e3a4eae08977f298ce7e477f04 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Wed, 12 Jan 2022 11:07:29 +0100 Subject: [PATCH] feat(alerts): EE changed build script feat(api): EE changed get roles --- api/build_alerts.sh | 2 +- ee/api/chalicelib/core/roles.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/build_alerts.sh b/api/build_alerts.sh index 83fac6f83..51504a276 100644 --- a/api/build_alerts.sh +++ b/api/build_alerts.sh @@ -23,7 +23,7 @@ function make_submodule() { [[ $1 == "ee" ]] && { # -- this part was generated by modules_lister.py -- mkdir alerts - cp -R ./{app_alerts,schemas}.py ./alerts/ + cp -R ./{app_alerts,schemas,schemas_ee}.py ./alerts/ mkdir -p ./alerts/chalicelib/ cp -R ./chalicelib/__init__.py ./alerts/chalicelib/ mkdir -p ./alerts/chalicelib/core/ diff --git a/ee/api/chalicelib/core/roles.py b/ee/api/chalicelib/core/roles.py index e8d72d29f..5bd80dc06 100644 --- a/ee/api/chalicelib/core/roles.py +++ b/ee/api/chalicelib/core/roles.py @@ -96,7 +96,7 @@ def create(tenant_id, user_id, data: schemas_ee.RolePayloadSchema): def get_roles(tenant_id): with pg_client.PostgresClient() as cur: cur.execute( - cur.mogrify("""SELECT *, COALESCE(projects, '{}') AS projects + cur.mogrify("""SELECT roles.*, COALESCE(projects, '{}') AS projects FROM public.roles LEFT JOIN LATERAL (SELECT array_agg(project_id) AS projects FROM roles_projects