fix(clients_and_providers): include 'both' type in client or provider filtering

This commit is contained in:
Galindo97
2026-01-22 13:43:31 -06:00
parent ce8712436e
commit 620e9fd2a8
2 changed files with 19 additions and 3 deletions

View File

@@ -46,7 +46,14 @@ async def get_clients_and_providers(
)
if type is not None:
query = query.filter(ClientProvider.client_or_provider == type)
# Include 'both' type when filtering by client or provider
from sqlalchemy import or_
query = query.filter(
or_(
ClientProvider.client_or_provider == type,
ClientProvider.client_or_provider == ClientOrProviderEnum.BOTH
)
)
if active is not None:
query = query.filter(ClientProvider.is_active == active)