Skip to content

Commit

Permalink
Replicas: fix sqlalchemy warning. #5522
Browse files Browse the repository at this point in the history
/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))
  • Loading branch information
rcarpa authored and bari12 committed Sep 5, 2022
1 parent 5595f49 commit ac9af2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rucio/core/replica.py
Expand Up @@ -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:
Expand Down

0 comments on commit ac9af2a

Please sign in to comment.