From 864204735ef5e59a6609f346dce480fb07a469cd Mon Sep 17 00:00:00 2001 From: Radu Carpa Date: Fri, 26 Aug 2022 09:00:21 +0200 Subject: [PATCH] Replicas: fix sqlalchemy warning. #5522 /opt/rucio/lib/rucio/core/replica.py:4272: SADeprecationWarning: Invoking or_() without arguments is deprecated, and will be disallowed in a future release. For an empty or_() construct, use or_(False, *args). replica_query = replica_query.filter(or_(*rse_clause)) --- lib/rucio/core/replica.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rucio/core/replica.py b/lib/rucio/core/replica.py index b953afea8d..ca12e96965 100644 --- a/lib/rucio/core/replica.py +++ b/lib/rucio/core/replica.py @@ -4265,10 +4265,10 @@ def _list_replicas_for_datasets_wo_temp_tables(dataset_clause, state_clause, rse if not ignore_availability: replica_query = replica_query.filter(models.RSE.availability.in_((4, 5, 6, 7))) - if state_clause is not None: + if state_clause: replica_query = replica_query.filter(and_(state_clause)) - if rse_clause is not None: + if rse_clause: replica_query = replica_query.filter(or_(*rse_clause)) if updated_after: