diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2021-06-06 15:48:50 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-06 15:48:50 +0530 |
commit | aaa585e3c27b9b2789d54a93a7a9b3cd04e2cce8 (patch) | |
tree | 5fd549c261e1bfc90cb34a51d188b16c1e10838c /app/apis.py | |
parent | 62a5ca363415b0f6f98785b6c3522a71fc895a72 (diff) | |
parent | b40c1104a2a89d2b82f0ce28156c54f0089eb379 (diff) |
Merge pull request #2 from navanchauhan/deepsource-fix-618a6511
Use identity check for comparison to a singleton
Diffstat (limited to 'app/apis.py')
-rw-r--r-- | app/apis.py | 2 |
1 files changed, 1 insertions, 1 deletions
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} |