diff --git a/h/streamer.py b/h/streamer.py index 79724c01afa..ab4304db4e4 100644 --- a/h/streamer.py +++ b/h/streamer.py @@ -495,8 +495,7 @@ def _expand_uris(self, clause): available_uris = set(uris) for uri in uris: doc = document.Document.get_by_uri(uri) - # get_by_uri() returns an empty list when no document is found - if isinstance(doc, list): + if doc is None: return for eq_uri in doc.uris(): available_uris.add(eq_uri) diff --git a/h/test/streamer_test.py b/h/test/streamer_test.py index dfced495665..b0dbf786649 100644 --- a/h/test/streamer_test.py +++ b/h/test/streamer_test.py @@ -270,7 +270,7 @@ def test_filter_message_will_not_change_for_empty_doc(self): }) with patch('annotator.document.Document.get_by_uri') as doc: - doc.return_value = [] + doc.return_value = None msg = MagicMock() msg.data = filter_message diff --git a/setup.py b/setup.py index be8054a65dc..1f9702b722f 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ def run_tests(self): 'PyJWT>=1.0.0,<2.0.0', 'SQLAlchemy>=0.8.0', 'alembic>=0.7.0', - 'annotator>=0.14.1,<0.15', + 'annotator>=0.14.2,<0.15', 'blinker>=1.3,<1.4', 'cryptacular>=1.4,<1.5', 'cryptography>=0.7',