I'm trying to use the following line through flask:
collection = 'mongo.db.vehicules.distinct("date_debut", {"modele":"Q5"})'
When I don't insert the second arguments, the query works fine. With the second one, I have the following error:
TypeError: distinct() takes 2 positional arguments but 3 were given
The same query in Mongo shell works fine.
Anyone has faced the same issue?
Thanks