I defined an optional cookie parameter and now want to check if the cookie was set. Unfortunately, the variable does not equal to None but to an empty Cookie object. How can I check the cookie object if it is set?
Here's how I defined the cookie parameter:
@app.route("/graphcall")
def graphcall(request: Request, ads_id: Optional[str] = Cookie(None)):
if ads_id:
# Do stuff if the ads_id is set