Skip to content

Commit

Permalink
fix after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Sovraska committed Dec 16, 2023
1 parent b707b29 commit 6041c61
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 188 deletions.
28 changes: 0 additions & 28 deletions alembic/versions/2348e4831674_fix_models_relationships.py

This file was deleted.

156 changes: 0 additions & 156 deletions alembic/versions/f880265a392e_models.py

This file was deleted.

2 changes: 1 addition & 1 deletion app/api/endpoints/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def create_course(
session: AsyncSession = Depends(get_async_session)
):
"""Создать Course"""
await check_name_duplicate(course.name, CourseCreate, session)
await check_name_duplicate(course.name, course_crud, session)
return await course_crud.create(
obj_in=course, session=session
)
Expand Down
2 changes: 1 addition & 1 deletion app/api/endpoints/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def create_profile(
obj_id=profile.user_id, crud=user_crud, session=session
)
return await profile_crud.create(
obj_in=profile, session=session
obj_in=profile, user_id=profile.user_id, session=session
)


Expand Down
1 change: 1 addition & 0 deletions app/schemas/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ class ProfileCreate(BaseModel):
first_name: Optional[str]
last_name: Optional[str]
age: Optional[int]
user_id: int
4 changes: 2 additions & 2 deletions app/schemas/tariff.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ class Config:
from_attributes = True


class TarifCreate(BaseModel):
class TariffCreate(BaseModel):
name: str
description: Optional[str]


class TariffCreated(TarifCreate):
class TariffCreated(TariffCreate):
id: int

class Config:
Expand Down

0 comments on commit 6041c61

Please sign in to comment.