I am using flask with pymongo and I have a case where my Object Id is being converted into a string. How can I change it back to an Object Id so I can use if for querying ?
From : 59d7ef576cab3d6118805a20
type is <class 'str'>
To: ObjectId("59d7ef576cab3d6118805a20")
type is <class 'bson.objectid.ObjectId'>