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
Merge requests
!85
Přidání validace formuláře editace kola -- kolo nemůže skončit dřív než začne
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Přidání validace formuláře editace kola -- kolo nemůže skončit dřív než začne
jk/time-check
into
devel
Overview
0
Commits
1
Changes
1
Merged
Jiří Kalvoda
requested to merge
jk/time-check
into
devel
3 years ago
Overview
0
Commits
1
Changes
1
Expand
0
0
Merge request reports
Compare
devel
devel (base)
and
latest version
latest version
75f2417e
1 commit,
3 years ago
1 file
+
11
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
mo/web/org_round.py
+
11
−
0
Options
@@ -458,6 +458,17 @@ class RoundEditForm(FlaskForm):
if
num_tasks
==
0
:
raise
ValidationError
(
'
Nejsou-li definovány žádné úlohy, stav musí být
"
připravuje se
"'
)
def
abstract_validate_time_order
(
self
,
field
):
if
field
.
data
is
not
None
:
if
any
([
i
.
data
is
not
None
and
i
.
data
>
field
.
data
for
i
in
[
self
.
ct_tasks_start
,
self
.
pr_tasks_start
]]):
raise
ValidationError
(
'
Soutěž nesmí skončit dříve než začne.
'
)
def
validate_ct_submit_end
(
self
,
field
):
self
.
abstract_validate_time_order
(
field
)
def
validate_pr_submit_end
(
self
,
field
):
self
.
abstract_validate_time_order
(
field
)
@app.route
(
'
/org/contest/r/<int:id>/edit
'
,
methods
=
(
'
GET
'
,
'
POST
'
))
def
org_round_edit
(
id
:
int
):
Loading