remove deleted spaces from search results

This commit is contained in:
Mhd Zayd Skaff
2025-07-27 08:43:27 +03:00
parent 331c8dffdc
commit 5a0b1a0084

View File

@ -193,7 +193,15 @@ export class CommunityService {
})
.distinct(true);
if (includeSpaces) {
matchingCommunityIdsQb.leftJoin('c.spaces', 'space');
matchingCommunityIdsQb.leftJoin(
'c.spaces',
'space',
'space.disabled = :disabled AND space.spaceName != :orphanSpaceName',
{
disabled: false,
orphanSpaceName: ORPHAN_SPACE_NAME,
},
);
}
if (search) {