Skip to content

Commit

Permalink
Merge branch 'release/v1.1.0' of https://github.com/voxel51/fiftyone
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
voxel51-bot committed Dec 3, 2024
2 parents 821b454 + 0e3fa78 commit b130409
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions fiftyone/server/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/unittests/lightning_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]},
Expand Down Expand Up @@ -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"]},
Expand Down

0 comments on commit b130409

Please sign in to comment.