From c03b1d96360fac556468d8bda262c5d8f1c7287a Mon Sep 17 00:00:00 2001 From: grillazz Date: Sat, 10 Apr 2021 19:26:51 +0200 Subject: [PATCH] clean names --- the_app/api/stuff.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/the_app/api/stuff.py b/the_app/api/stuff.py index 0043a13..825a822 100644 --- a/the_app/api/stuff.py +++ b/the_app/api/stuff.py @@ -20,14 +20,13 @@ async def find_stuff( name: str, db_session: AsyncSession = Depends(get_db), ): - stuff_instance = await Stuff.find(db_session, name) - return stuff_instance + return await Stuff.find(db_session, name) @router.delete("/") async def delete_stuff(name: str, db_session: AsyncSession = Depends(get_db)): - stuff_instance = await Stuff.find(db_session, name) - return await Stuff.delete(stuff_instance, db_session) + stuff = await Stuff.find(db_session, name) + return await Stuff.delete(stuff, db_session) @router.patch("/", response_model=StuffResponse)