diff --git a/fiftyone/server/lightning.py b/fiftyone/server/lightning.py index b29ba82b52..c3443dec19 100644 --- a/fiftyone/server/lightning.py +++ b/fiftyone/server/lightning.py @@ -328,7 +328,7 @@ async def _do_async_query( ): if isinstance(query, DistinctQuery): if query.has_list: - return await _do_distinct_query(collection, query, filter) + return await _do_distinct_query(collection, query) return await _do_distinct_pipeline(dataset, collection, query, filter) @@ -343,14 +343,13 @@ async def _do_async_query( async def _do_distinct_query( collection: AsyncIOMotorCollection, query: DistinctQuery, - filter: t.Optional[t.Mapping[str, str]], ): match = None if query.search: match = query.search try: - result = await collection.distinct(query.path, filter) + result = await collection.distinct(query.path) except: # too many results return None diff --git a/tests/unittests/lightning_tests.py b/tests/unittests/lightning_tests.py index bd59703ee5..2d2458dc94 100644 --- a/tests/unittests/lightning_tests.py +++ b/tests/unittests/lightning_tests.py @@ -1132,7 +1132,7 @@ async def test_group_dataset(self, dataset: fo.Dataset): }, { "path": "classifications.classifications.label", - "values": ["one"], + "values": ["one", "two"], }, {"path": "numeric", "min": 1.0, "max": 1.0}, {"path": "string", "values": ["one"]}, @@ -1164,7 +1164,7 @@ async def test_group_dataset(self, dataset: fo.Dataset): }, { "path": "classifications.classifications.label", - "values": ["two"], + "values": ["one", "two"], }, {"path": "numeric", "min": 2.0, "max": 2.0}, {"path": "string", "values": ["two"]},