поправил сохранение списка контента в набора

This commit is contained in:
Андрей Дувакин 2025-02-26 10:51:53 +05:00
parent 03c67c4d2f
commit b0bca54f22
2 changed files with 5 additions and 14 deletions

View File

@ -28,7 +28,10 @@ class SetContentRepository:
async def create_list(self, sets_content: list[SetContent]) -> list[SetContent]:
self.db.add_all(sets_content)
await self.db.commit()
await self.db.refresh(sets_content)
for set_content in sets_content:
await self.db.refresh(set_content)
return sets_content
async def create(self, set_content: SetContent) -> SetContent:

View File

@ -1,23 +1,11 @@
alembic==1.14.1
annotated-types==0.7.0
anyio==4.8.0
asyncpg==0.30.0
click==8.1.8
fastapi==0.115.8
greenlet==3.1.1
h11==0.14.0
idna==3.10
Mako==1.3.8
MarkupSafe==3.0.2
psycopg==3.2.4
psycopg-binary==3.2.4
pydantic==2.10.6
pydantic-settings==2.7.1
pydantic_core==2.27.2
python-dotenv==1.0.1
sniffio==1.3.1
SQLAlchemy==2.0.37
starlette==0.45.3
typing_extensions==4.12.2
uvicorn==0.34.0
Werkzeug==3.1.3
pyjwt==2.10.1