diff --git a/mo/web/api.py b/mo/web/api.py index b6ba68baabdc576c2a0cfb71d6ccd0c2f9495192..1f0ac5c747a67b347c912dcb2e32ff2c0525a6da 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())