From 35ed2c9c700a47600358cad0a16f2d3b1da5cbd9 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 12 Jan 2024 14:19:00 +0100 Subject: [PATCH] feat(api): project conditions foss to ee --- ee/api/chalicelib/core/projects.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ee/api/chalicelib/core/projects.py b/ee/api/chalicelib/core/projects.py index 87ef5b2e0..69bceee57 100644 --- a/ee/api/chalicelib/core/projects.py +++ b/ee/api/chalicelib/core/projects.py @@ -80,7 +80,8 @@ def get_projects(tenant_id: int, gdpr: bool = False, recorded: bool = False, use query = cur.mogrify(f"""{"SELECT *, first_recorded IS NOT NULL AS recorded FROM (" if recorded else ""} SELECT s.project_id, s.name, s.project_key, s.save_request_payloads, s.first_recorded_session_at, - s.created_at, s.sessions_last_check_at, s.sample_rate, s.platform + s.created_at, s.sessions_last_check_at, s.sample_rate, s.platform, + (SELECT count(*) FROM projects_conditions WHERE project_id = s.project_id) AS conditions_count {extra_projection} FROM public.projects AS s {role_query if user_id is not None else ""}