示例#1
0
文件: place.py 项目: iluddy/flock
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)
示例#2
0
文件: place.py 项目: ianluddy/flock
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')