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
@@ -31,7 +31,7 @@ async def get_prompts(user=Depends(get_verified_user)):
@router.post("/create", response_model=Optional[PromptModel])
async def create_new_prompt(form_data: PromptForm, user=Depends(get_admin_user)):
prompt = Prompts.get_prompt_by_command(form_data.command)
if prompt == None:
if prompt is None:
prompt = Prompts.insert_new_prompt(user.id, form_data)
if prompt: