refactor: replace is_() method with direct boolean comparison
This commit is contained in:
parent
d8ec61802d
commit
bcee1f277f
2 changed files with 6 additions and 6 deletions
|
|
@ -993,7 +993,7 @@ async def diagnostic_complet(session: AsyncSession = Depends(get_session)):
|
|||
date_limite = datetime.now() - timedelta(hours=1)
|
||||
sans_sync_query = select(func.count(UniversignTransaction.id)).where(
|
||||
and_(
|
||||
UniversignTransaction.needs_sync.is_(true()),
|
||||
UniversignTransaction.needs_sync,
|
||||
or_(
|
||||
UniversignTransaction.last_synced_at < date_limite,
|
||||
UniversignTransaction.last_synced_at.is_(None),
|
||||
|
|
@ -1023,7 +1023,7 @@ async def diagnostic_complet(session: AsyncSession = Depends(get_session)):
|
|||
# Transactions sans webhook reçu
|
||||
sans_webhook_query = select(func.count(UniversignTransaction.id)).where(
|
||||
and_(
|
||||
UniversignTransaction.webhook_received.is_(false()),
|
||||
not UniversignTransaction.webhook_received,
|
||||
UniversignTransaction.local_status != LocalDocumentStatus.PENDING,
|
||||
)
|
||||
)
|
||||
|
|
@ -1521,7 +1521,7 @@ async def telecharger_documents_manquants(
|
|||
UniversignTransaction.local_status == LocalDocumentStatus.SIGNED,
|
||||
or_(
|
||||
UniversignTransaction.signed_document_path.is_(None),
|
||||
force_redownload.is_(true()),
|
||||
force_redownload,
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class SageGatewayService:
|
|||
and_(
|
||||
SageGatewayConfig.id == gateway_id,
|
||||
SageGatewayConfig.user_id == user_id,
|
||||
# SageGatewayConfig.is_deleted.is_(false()),
|
||||
SageGatewayConfig.is_deleted == false(),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
@ -67,7 +67,7 @@ class SageGatewayService:
|
|||
query = select(SageGatewayConfig).where(SageGatewayConfig.user_id == user_id)
|
||||
|
||||
if not include_deleted:
|
||||
query = query.where(SageGatewayConfig.is_deleted.is_(false()))
|
||||
query = query.where(SageGatewayConfig.is_deleted == false())
|
||||
|
||||
query = query.order_by(
|
||||
SageGatewayConfig.is_active.desc(),
|
||||
|
|
@ -167,7 +167,7 @@ class SageGatewayService:
|
|||
and_(
|
||||
SageGatewayConfig.user_id == user_id,
|
||||
SageGatewayConfig.is_active,
|
||||
SageGatewayConfig.is_deleted.is_(true()),
|
||||
SageGatewayConfig.is_deleted == false(),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue