Update main.py

This commit is contained in:
Game_Time 2023-08-20 15:18:36 +05:00 committed by GitHub
parent 0877645981
commit 6c8814e885
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,7 @@ app.include_router(core.router)
async def startup_event():
# DATABASE FIX https://stackoverflow.com/questions/65970988/python-mongodb-motor-objectid-object-is-not-iterable-error-while-trying-to-f
import pydantic, bson
pydantic.json.ENCODERS_BY_TYPE[bson.objectid.ObjectId]=str
# pydantic.json.ENCODERS_BY_TYPE[bson.objectid.ObjectId]=str
@app.get('/')
async def root():