From 3bf00cea6a87be80e96a14582af88560a69c9496 Mon Sep 17 00:00:00 2001 From: dm1sh Date: Fri, 11 Aug 2023 17:27:01 +0300 Subject: [PATCH] Fixed putting ann media src saving --- back/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/api.py b/back/api.py index e3fe7c8..b3e0e1c 100644 --- a/back/api.py +++ b/back/api.py @@ -87,7 +87,7 @@ def put_in_db(name: Annotated[str, Form()], category: Annotated[str, Form()], be temp_ancmt = models.Announcement(user_id=current_user.id, name=name, category=category, best_by=bestBy, address=address, longtitude=longtitude, latitude=latitude, description=description, metro=metro, - trashId=trashId, booked_by=0) + trashId=trashId, src=uploaded_name, booked_by=0) db.add(temp_ancmt) # добавляем в бд db.commit() # сохраняем изменения db.refresh(temp_ancmt) # обновляем состояние объекта