Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
miboelae committed May 23, 2024
1 parent 279a90b commit 54740ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/src/subject/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"student_subject",
Base.metadata,
Column("uid", ForeignKey("website_user.uid", ondelete="CASCADE"), primary_key=True),
Column("subject_id", ForeignKey("subject.id" , ondelete="CASCADE"), primary_key=True),
Column("subject_id", ForeignKey("subject.id", ondelete="CASCADE"), primary_key=True),
)

InstructorSubject = Table(
Expand Down
4 changes: 2 additions & 2 deletions backend/src/user/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ async def set_teacher(db: AsyncSession, user_id: str, value: bool):
async def delete_user(db: AsyncSession, user_id: str):
user = await get_by_id(db, user_id)
if user:
await db.execute(delete(StudentSubject).where(StudentSubject.c.uid == user_id))
await db.execute(delete(StudentSubject).where(StudentSubject.c.uid == user_id))
await db.execute(delete(InstructorProject).where(InstructorProject.c.uid == user_id))
await db.execute(delete(StudentGroup).where(StudentGroup.c.uid == user_id))
await db.flush()

await db.delete(user)
await db.commit()

Expand Down

0 comments on commit 54740ac

Please sign in to comment.