diff --git a/lib/galaxy/managers/histories.py b/lib/galaxy/managers/histories.py index 6b1e3d256d9e..e704c3569815 100644 --- a/lib/galaxy/managers/histories.py +++ b/lib/galaxy/managers/histories.py @@ -207,6 +207,8 @@ def p_tag_filter(term_text: str, quoted: bool): self.model_class.deleted == (true() if show_deleted else false()) ) + stmt = stmt.distinct() + if include_total_count: total_matches = get_count(trans.sa_session, stmt) else: