From cf5d66b72b70b08e1f6960d23bf4c75b49162619 Mon Sep 17 00:00:00 2001 From: Laurent LAPORTE Date: Tue, 5 Mar 2024 15:38:12 +0100 Subject: [PATCH] chore: correct query in `StudyMetadataRepository.list_duplicates` --- antarest/study/repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/antarest/study/repository.py b/antarest/study/repository.py index 6e89d33d5a..ef827bb1df 100644 --- a/antarest/study/repository.py +++ b/antarest/study/repository.py @@ -406,5 +406,5 @@ def list_duplicates(self) -> t.List[t.Tuple[str, str]]: """ session = self.session subquery = session.query(Study.path).group_by(Study.path).having(func.count() > 1).subquery() - query = session.query(Study.id, Study.path).filter(Study.path.in_(subquery)) + query = session.query(Study.id, Study.path).filter(Study.path.in_(subquery.as_scalar())) return t.cast(t.List[t.Tuple[str, str]], query.all())