replace == None with is None

This commit is contained in:
Michael Poluektov
2024-08-14 13:39:53 +01:00
parent 6f72def1ac
commit 038fc48ac0
6 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ async def get_documents(user=Depends(get_verified_user)):
@router.post("/create", response_model=Optional[DocumentResponse])
async def create_new_doc(form_data: DocumentForm, user=Depends(get_admin_user)):
doc = Documents.get_doc_by_name(form_data.name)
if doc == None:
if doc is None:
doc = Documents.insert_new_doc(user.id, form_data)
if doc: