memory (sqla): Add a filter for origin in history_get:

rel 459
This commit is contained in:
Goffi 2025-06-08 17:16:58 +02:00
commit 328e0ce775

View file

@ -675,6 +675,10 @@ class Storage:
stmt = stmt.where(
exists().where(subquery.c.value == keyword)
)
if "origin" in filters:
stmt = stmt.where(
History.extra["origin"].as_string() == filters["origin"]
)
if limit is not None:
stmt = stmt.limit(limit)