diff --git a/src/aleph/db/accessors/messages.py b/src/aleph/db/accessors/messages.py index 562b0daf2..c3b5e0256 100644 --- a/src/aleph/db/accessors/messages.py +++ b/src/aleph/db/accessors/messages.py @@ -130,7 +130,7 @@ def make_matching_messages_query( ) if start_block: select_stmt = select_stmt.where( - select_earliest_confirmation.c.height.is_(None) or select_earliest_confirmation.c.height >= start_block + select_earliest_confirmation.c.height.is_(None) | select_earliest_confirmation.c.height >= start_block ) if end_block: select_stmt = select_stmt.where(