human hand off fix

This commit is contained in:
debu-2 2026-10-06 07:20:02 +05:30
parent 7b39f956e6
commit e72f63dc54

View file

@ -42,7 +42,8 @@ async def ensure_mongo_index(collection, keys, **options) -> None:
desired_unique = bool(options.get("unique"))
desired_sparse = bool(options.get("sparse"))
async for index in collection.list_indexes():
async with await collection.list_indexes() as cursor:
async for index in cursor:
if index["name"] == "_id_":
continue
index_key = list(index["key"].items())