Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MO-P
Odevzdávací Systém MO
Commits
e3412b9a
Project 'mj/mo-submit' was moved to 'mo-p/osmo'. Please update any links and bookmarks that may still have the old path.
Commit
e3412b9a
authored
Jan 17, 2022
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Opraven zakomentovaný joinedload v mazání uživatelů
parent
35964489
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mo/web/org_users.py
+2
-2
2 additions, 2 deletions
mo/web/org_users.py
with
2 additions
and
2 deletions
mo/web/org_users.py
+
2
−
2
View file @
e3412b9a
...
@@ -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.c
ontest.round))
.
options
(
joinedload
(
db
.
Participation
.
contest
).
joinedload
(
db
.
C
ontest
.
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.t
ask.round))
.
options
(
joinedload
(
db
.
Solution
.
task
).
joinedload
(
db
.
T
ask
.
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
()
}
'
)
...
...
...
...
This diff is collapsed.
Click to expand it.
Martin Mareš
@mj
mentioned in commit
6fa8e170
·
Jan 17, 2022
mentioned in commit
6fa8e170
mentioned in commit 6fa8e170a3bd573e7ef174584b6c90da83a1f6c9
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment