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
8bd91843
Commit
8bd91843
authored
3 years ago
by
Jiří Kalvoda
Browse files
Options
Downloads
Patches
Plain Diff
Import: Výchozí oblast
parent
774103f3
No related branches found
No related tags found
1 merge request
!97
Import orgů
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mo/imports.py
+6
-1
6 additions, 1 deletion
mo/imports.py
with
6 additions
and
1 deletion
mo/imports.py
+
6
−
1
View file @
8bd91843
...
...
@@ -528,6 +528,9 @@ class OrgsImport(Import):
oblast
=
self
.
parse_opt_place
(
r
.
kod_oblasti
,
'
oblast
'
)
role
=
self
.
parse_role
(
r
.
role
)
if
oblast
is
None
:
oblast
=
self
.
default_place
if
role
!=
db
.
RoleType
.
opravovatel
:
contest
=
self
.
obtain_contest
(
oblast
,
allow_none
=
True
)
place
=
contest
.
place
if
contest
else
self
.
root_place
...
...
@@ -705,7 +708,8 @@ def create_import(user: db.User,
only_region
:
Optional
[
db
.
Place
]
=
None
,
task
:
Optional
[
db
.
Task
]
=
None
,
allow_add_del
:
bool
=
False
,
allow_change_user_to_org
:
bool
=
False
):
allow_change_user_to_org
:
bool
=
False
,
default_place
:
Optional
[
db
.
Place
]
=
None
):
imp
:
Import
if
type
==
ImportType
.
participants
:
imp
=
ContestImport
()
...
...
@@ -725,6 +729,7 @@ def create_import(user: db.User,
imp
.
allow_add_del
=
allow_add_del
imp
.
fmt
=
fmt
imp
.
gatekeeper
=
mo
.
rights
.
Gatekeeper
(
user
)
imp
.
default_place
=
default_place
imp
.
setup
()
return
imp
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