Skip to content
Snippets Groups Projects
Commit e3412b9a authored by Martin Mareš's avatar Martin Mareš
Browse files

Opraven zakomentovaný joinedload v mazání uživatelů

parent 35964489
Branches
No related tags found
No related merge requests found
...@@ -689,7 +689,7 @@ def org_user_delete(user_id: int): ...@@ -689,7 +689,7 @@ def org_user_delete(user_id: int):
pions = (sess.query(db.Participation) pions = (sess.query(db.Participation)
.filter_by(user=user) .filter_by(user=user)
# .options(joinedload(db.Participation.contest, db.Participation.contest.round)) .options(joinedload(db.Participation.contest).joinedload(db.Contest.round))
.all()) .all())
for pion in pions: for pion in pions:
warnings.append(f'Účastní se kola {pion.contest.round.round_code()}') warnings.append(f'Účastní se kola {pion.contest.round.round_code()}')
...@@ -700,7 +700,7 @@ def org_user_delete(user_id: int): ...@@ -700,7 +700,7 @@ def org_user_delete(user_id: int):
sols = (sess.query(db.Solution) sols = (sess.query(db.Solution)
.filter_by(user=user) .filter_by(user=user)
# .options(joinedload(db.Solution.task, db.Solution.task.round)) .options(joinedload(db.Solution.task).joinedload(db.Task.round))
.all()) .all())
for sol in sols: for sol in sols:
errors.append(f'Odevzdal úlohu {sol.task.code} v kole {sol.task.round.round_code()}') errors.append(f'Odevzdal úlohu {sol.task.code} v kole {sol.task.round.round_code()}')
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment