Skip to content
Snippets Groups Projects
Commit bd7a594e authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

Účastníkům při výběru školy nezobrazujeme skrytá místa

Closes #253
parent a7dda4db
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !106. Comments created here will be created in the context of that merge request.
......@@ -27,6 +27,7 @@ def api_find_town():
places = (db.get_session().query(db.Place)
.filter_by(level=3)
.filter(func.lower(db.f_unaccent(db.Place.name)).like(func.lower(db.f_unaccent(query + '%'))))
.filter(db.Place.hidden == False)
.options(joinedload(db.Place.parent_place))
.order_by(db.Place.name, db.Place.place_id)
.limit(max_places)
......@@ -59,6 +60,7 @@ def api_get_schools():
places = (db.get_session().query(db.Place)
.filter_by(level=4, type=db.PlaceType.school, parent=town_id)
.options(joinedload(db.Place.school))
.filter(db.Place.hidden == False)
.order_by(db.Place.name)
.all())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment