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
Martin Mareš
Odevzdávací Systém MO
Commits
1a1f02fe
Commit
1a1f02fe
authored
2 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Logování: Připsáno několik flushů, aby byla data kompletní"
This reverts commit
b3b2fe8d
.
parent
1c1c77a2
Branches
Branches containing commit
No related tags found
1 merge request
!129
Bezpečné transakce při zakládání uživatelů/účastníků/účastí
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mo/users.py
+0
-2
0 additions, 2 deletions
mo/users.py
mo/web/user.py
+0
-1
0 additions, 1 deletion
mo/web/user.py
with
0 additions
and
3 deletions
mo/users.py
+
0
−
2
View file @
1a1f02fe
...
...
@@ -146,7 +146,6 @@ def find_or_create_participant(user: db.User, year: int, school_id: Optional[int
raise
mo
.
CheckError
(
'
Osoba s daným e-mailem zatím není zaregistrovaná do ročníku, je nutné uvést ročník.
'
)
part
=
db
.
Participant
(
user
=
user
,
year
=
year
,
school
=
school_id
,
birth_year
=
birth_year
,
grade
=
grade
)
sess
.
add
(
part
)
sess
.
flush
()
# Kvůli logování
logger
.
info
(
f
'
{
reason
.
title
()
}
: Založen účastník #
{
user
.
user_id
}
'
)
mo
.
util
.
log
(
type
=
db
.
LogType
.
participant
,
...
...
@@ -175,7 +174,6 @@ def find_or_create_participation(user: db.User, contest: db.Contest, place: Opti
if
is_new
:
pion
=
db
.
Participation
(
user
=
user
,
contest
=
contest
,
place_id
=
place
.
place_id
,
state
=
db
.
PartState
.
active
)
sess
.
add
(
pion
)
sess
.
flush
()
# Kvůli logování
logger
.
info
(
f
'
{
reason
.
title
()
}
: Založena účast user=#
{
user
.
user_id
}
contest=#
{
contest
.
contest_id
}
place=#
{
place
.
place_id
}
'
)
mo
.
util
.
log
(
type
=
db
.
LogType
.
participant
,
...
...
This diff is collapsed.
Click to expand it.
mo/web/user.py
+
0
−
1
View file @
1a1f02fe
...
...
@@ -221,7 +221,6 @@ def join_create_pion(c: db.Contest) -> None:
state
=
db
.
PartState
.
registered
p
=
db
.
Participation
(
user
=
g
.
user
,
contest
=
c
,
place
=
c
.
place
,
state
=
state
)
sess
.
add
(
p
)
sess
.
flush
()
# Kvůli logování
logger
.
info
(
f
'
Join: Účastník #
{
g
.
user
.
user_id
}
přihlášen do soutěže #
{
c
.
contest_id
}
'
)
mo
.
util
.
log
(
...
...
This diff is collapsed.
Click to expand it.
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
register
or
sign in
to comment