Skip to content

Commit

Permalink
Fix: empty query from condition failing search
Browse files Browse the repository at this point in the history
  • Loading branch information
mesemus committed Jan 25, 2025
1 parent 1230ad6 commit 00a43f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion oarepo_workflows/services/permissions/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
def _make_query(generators: Iterable[Generator], **context: Any) -> dict | None:
queries = [g.query_filter(**context) for g in generators]
queries = [q for q in queries if q]
return reduce(operator.or_, queries) if queries else None
return reduce(operator.or_, queries) if queries else dsl.Q("match_none")


class FromRecordWorkflow(Generator):
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = oarepo-workflows
version = 1.1.5
version = 1.1.6
description =
authors = Ronald Krist <[email protected]>
readme = README.md
Expand Down

0 comments on commit 00a43f9

Please sign in to comment.