From 5cd4871a81a052b6cbc653f5cd9a776f0715c07c Mon Sep 17 00:00:00 2001 From: shreddedbacon <b@benjackson.email> Date: Tue, 5 Dec 2023 09:08:32 +1100 Subject: [PATCH] fix: re-add buildimage filter to project query --- services/api/src/resources/project/resolvers.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/api/src/resources/project/resolvers.ts b/services/api/src/resources/project/resolvers.ts index dfe56b4247..1d1b720957 100644 --- a/services/api/src/resources/project/resolvers.ts +++ b/services/api/src/resources/project/resolvers.ts @@ -68,7 +68,7 @@ export const getProjectDeployKey: ResolverFn = async ( export const getAllProjects: ResolverFn = async ( root, - { order, createdAfter, gitUrl }, + { order, createdAfter, gitUrl, buildImage }, { sqlClientPool, hasPermission, models, keycloakGrant, keycloakUsersGroups } ) => { let userProjectIds: number[]; @@ -97,6 +97,10 @@ export const getAllProjects: ResolverFn = async ( queryBuilder = queryBuilder.andWhere('git_url', gitUrl); } + if (buildImage) { + queryBuilder = queryBuilder.and.whereNot('build_image', ''); + } + if (userProjectIds) { queryBuilder = queryBuilder.whereIn('id', userProjectIds); }