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
8779efd6
Commit
8779efd6
authored
4 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Kolo nelze přepnout ze stavu "preparing", dokud není nastaven čas začátku
parent
4b44aeec
No related branches found
No related tags found
1 merge request
!49
Stavy soutěže
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mo/web/org_round.py
+5
-1
5 additions, 1 deletion
mo/web/org_round.py
with
5 additions
and
1 deletion
mo/web/org_round.py
+
5
−
1
View file @
8779efd6
...
...
@@ -7,7 +7,7 @@ from sqlalchemy.sql.functions import coalesce
from
typing
import
Optional
,
Tuple
import
werkzeug.exceptions
import
wtforms
from
wtforms
import
validators
from
wtforms
import
validators
,
ValidationError
from
wtforms.fields.html5
import
IntegerField
import
mo
...
...
@@ -419,6 +419,10 @@ class RoundEditForm(FlaskForm):
)
submit
=
wtforms
.
SubmitField
(
'
Uložit
'
)
def
validate_state
(
self
,
field
):
if
field
.
data
!=
db
.
RoundState
.
preparing
and
self
.
ct_tasks_start
.
data
is
None
:
raise
ValidationError
(
'
Není-li nastaven času začátku soutěže, stav musí být
"
připravuje se
"'
)
@app.route
(
'
/org/contest/r/<int:id>/edit
'
,
methods
=
(
'
GET
'
,
'
POST
'
))
def
org_round_edit
(
id
:
int
):
...
...
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