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
Merge requests
!2
Place editing
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Place editing
jirka/schools
into
master
Overview
28
Commits
14
Changes
1
Merged
Jiří Setnička
requested to merge
jirka/schools
into
master
4 years ago
Overview
28
Commits
14
Changes
1
0
0
Merge request reports
Viewing commit
e7c30b5f
Prev
Next
Show latest version
1 file
+
11
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
e7c30b5f
init-schools: db.School a db.Place se nyní musí joinovat
· e7c30b5f
Martin Mareš
authored
4 years ago
bin/init-schools
+
11
−
3
View file @ e7c30b5f
Edit in single-file editor
Open in Web IDE
Show full file
@@ -63,7 +63,13 @@ def import_schools(path: Path, nuts: str):
else
:
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
:
assert
school
.
official_name
==
nazev
if
is_zs
:
@@ -71,11 +77,13 @@ def import_schools(path: Path, nuts: str):
else
:
school
.
is_ss
=
True
else
:
school
=
db
.
School
(
place
=
db
.
Place
(
level
=
4
,
parent
=
town
.
place_id
,
name
=
nazev
,
type
=
db
.
PlaceType
.
school
,
type
=
db
.
PlaceType
.
school
)
school
=
db
.
School
(
place
=
place
,
red_izo
=
red_izo
,
official_name
=
nazev
,
address
=
addr2
,
Loading