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
MO-P
Odevzdávací Systém MO
Commits
e7c30b5f
Project 'mj/mo-submit' was moved to 'mo-p/osmo'. Please update any links and bookmarks that may still have the old path.
Commit
e7c30b5f
authored
Dec 30, 2020
by
Martin Mareš
Committed by
Jiří Setnička
Dec 31, 2020
Browse files
Options
Downloads
Patches
Plain Diff
init-schools: db.School a db.Place se nyní musí joinovat
parent
8c04b74a
Branches
Branches containing commit
No related tags found
1 merge request
!2
Place editing
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/init-schools
+11
-3
11 additions, 3 deletions
bin/init-schools
with
11 additions
and
3 deletions
bin/init-schools
+
11
−
3
View file @
e7c30b5f
...
@@ -63,7 +63,13 @@ def import_schools(path: Path, nuts: str):
...
@@ -63,7 +63,13 @@ def import_schools(path: Path, nuts: str):
else
:
else
:
assert
False
,
f
"
Neznámý druh školy:
{
druh
}
"
assert
False
,
f
"
Neznámý druh školy:
{
druh
}
"
school
=
session
.
query
(
db
.
School
).
filter_by
(
level
=
4
,
parent
=
town
.
place_id
,
red_izo
=
red_izo
,
address
=
addr2
).
first
()
school
=
(
session
.
query
(
db
.
School
)
.
join
(
db
.
Place
)
.
filter
(
db
.
Place
.
level
==
4
)
.
filter
(
db
.
Place
.
parent
==
town
.
place_id
)
.
filter
(
db
.
School
.
red_izo
==
red_izo
)
.
filter
(
db
.
School
.
address
==
addr2
)
.
first
())
if
school
:
if
school
:
assert
school
.
official_name
==
nazev
assert
school
.
official_name
==
nazev
if
is_zs
:
if
is_zs
:
...
@@ -71,11 +77,13 @@ def import_schools(path: Path, nuts: str):
...
@@ -71,11 +77,13 @@ def import_schools(path: Path, nuts: str):
else
:
else
:
school
.
is_ss
=
True
school
.
is_ss
=
True
else
:
else
:
school
=
db
.
School
(
place
=
db
.
Place
(
level
=
4
,
level
=
4
,
parent
=
town
.
place_id
,
parent
=
town
.
place_id
,
name
=
nazev
,
name
=
nazev
,
type
=
db
.
PlaceType
.
school
,
type
=
db
.
PlaceType
.
school
)
school
=
db
.
School
(
place
=
place
,
red_izo
=
red_izo
,
red_izo
=
red_izo
,
official_name
=
nazev
,
official_name
=
nazev
,
address
=
addr2
,
address
=
addr2
,
...
...
...
...
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
sign in
to comment