diff --git a/back/api.py b/back/api.py index 661f3b8..2b83090 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) # обновляем состояние объекта