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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
ecadfb96
Commit
ecadfb96
authored
3 years ago
by
Martin Mareš
Committed by
Jan Prachař
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
create-contests: Přeskakuje již existující soutěže
parent
f6e9bcea
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/create-contests
+14
-11
14 additions, 11 deletions
bin/create-contests
with
14 additions
and
11 deletions
bin/create-contests
+
14
−
11
View file @
ecadfb96
...
...
@@ -48,17 +48,20 @@ else:
assert
regions
,
"
Neexistují žádná místa dané úrovně
"
for
r
in
regions
:
print
(
f
"
Zakládám
{
round
.
round_code
()
}
pro místo
{
r
.
name
}
"
)
if
not
args
.
dry_run
:
c
=
db
.
Contest
(
round
=
round
,
place
=
r
,
state
=
state
)
sess
.
add
(
c
)
sess
.
flush
()
c
.
master
=
c
mo
.
util
.
log
(
db
.
LogType
.
contest
,
c
.
contest_id
,
{
'
action
'
:
'
created
'
,
})
if
sess
.
query
(
db
.
Contest
).
filter_by
(
round
=
round
,
place
=
r
).
first
():
print
(
f
"
{
round
.
round_code
()
}
pro místo
{
r
.
name
}
: již existuje
"
)
else
:
print
(
f
"
{
round
.
round_code
()
}
pro místo
{
r
.
name
}
: zakládám
"
)
if
not
args
.
dry_run
:
c
=
db
.
Contest
(
round
=
round
,
place
=
r
,
state
=
state
)
sess
.
add
(
c
)
sess
.
flush
()
c
.
master
=
c
mo
.
util
.
log
(
db
.
LogType
.
contest
,
c
.
contest_id
,
{
'
action
'
:
'
created
'
,
})
if
not
args
.
dry_run
:
sess
.
commit
()
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