MLab Object ID retrieval error

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



MLab Object ID retrieval error



I'm using Mlab to host my mongoDB database. I've been having trouble to obtain the object ID from the Mlab collections. I'm using a flask extension called Flask-MongoAlchemy for this. I've been trying to obtain the object ID in this way but in vain.
Here's the code I've used for this:


employee = Employee.query.filter_by(email=request.form['email']).first()
session['employee_id'] = employee.get_or_404(id)



Here's the schema:



"_id":
"$oid": "5b6735ac911cb113afede8ad"
,
"email": "saicharan.reddy1@gmail.com",
"password": "$2b$10$iqj0re6ssg2Y9MxZPuJFcOP/rh7zX6umcS5jG7XHLFeD7V8rpMn.S",
"first_name": "Saicharan",
"last_name": "Reddy"









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

g4AOKgzxUrdFIlUhfYbG4n3,QfLeLLirwBC vOqTQWass viqOkZy0,yFdG,O
DRJJ67b2,xz1IkoeyTO,a,IH2o KYk3oLY71OflE5Zvmw VAg1jKpbN,LHoKImWTpPEu3A 35ivM9e,RuoElT5R,WURWIJntt5dgSbN

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3