def get(company_id, search=None, sort_by=None, sort_dir=None, limit=None, offset=None): return db.place_get(company_id, search=search, sort_by=sort_by, sort_dir=sort_dir, limit=limit, offset=offset)
def delete(place_id): place_name = db.place_get(place_id=place_id).name if db.event_get(place_id=place_id): abort(400, 'There are Events associated with this Place') db.place_delete(place_id) notify(u'{} deleted a Place - <strong>%s</strong>' % place_name, action='delete', target='place')