From b40c1104a2a89d2b82f0ce28156c54f0089eb379 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sun, 6 Jun 2021 10:17:27 +0000 Subject: Use identity check for comparison to a singleton --- app/apis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/apis.py') diff --git a/app/apis.py b/app/apis.py index b81882e..69bf222 100644 --- a/app/apis.py +++ b/app/apis.py @@ -14,7 +14,7 @@ async def API_Version(): async def API_User_Details(email: str): user = models.User.query.filter_by(email=email).first() try: - assert user != None + assert user is not None except AssertionError: raise HTTPException(status_code=404, detail="User Not Found") return {"first_name": user.first_name, "last_name": user.last_name} -- cgit v1.2.3