From bd7a594e3ca772e2c898ee13459e216a7e2b87ab Mon Sep 17 00:00:00 2001 From: Jiri Kalvoda <jirikalvoda@kam.mff.cuni.cz> Date: Sat, 20 Nov 2021 20:54:30 +0100 Subject: [PATCH] =?UTF-8?q?=C3=9A=C4=8Dastn=C3=ADk=C5=AFm=20p=C5=99i=20v?= =?UTF-8?q?=C3=BDb=C4=9Bru=20=C5=A1koly=20nezobrazujeme=20skryt=C3=A1=20m?= =?UTF-8?q?=C3=ADsta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #253 --- mo/web/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mo/web/api.py b/mo/web/api.py index b6ba68ba..1f0ac5c7 100644 --- a/mo/web/api.py +++ b/mo/web/api.py @@ -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()) -- GitLab