Skip to content
Snippets Groups Projects
Commit d9e4c83f 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 0a4a6240
No related branches found
No related tags found
1 merge request!106Účastníkům při výběru školy nezobrazujeme skrytá místa
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