mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: trail issue
This commit is contained in:
parent
2108763b6d
commit
d3853c69ce
1 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ async def create_user_trail(
|
|||
trail_object: TrailCreate,
|
||||
db_session: Session,
|
||||
) -> Trail:
|
||||
statement = select(Trail).where(Trail.org_id == trail_object.org_id)
|
||||
statement = select(Trail).where(Trail.org_id == trail_object.org_id, Trail.user_id == user.id)
|
||||
trail = db_session.exec(statement).first()
|
||||
|
||||
if trail:
|
||||
|
|
@ -103,7 +103,7 @@ async def check_trail_presence(
|
|||
user: PublicUser,
|
||||
db_session: Session,
|
||||
):
|
||||
statement = select(Trail).where(Trail.org_id == org_id, Trail.user_id == user.id)
|
||||
statement = select(Trail).where(Trail.org_id == org_id, Trail.user_id == user_id)
|
||||
trail = db_session.exec(statement).first()
|
||||
|
||||
if not trail:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue