def get_business_logs(uid, db): rows = fetch_semantic_logs(uid, db) for row in rows: row['location'] = row['business'] and row['business'] or row['district'] return rows
def get_district_logs(uid, db): rows = fetch_semantic_logs(uid, db) for row in rows: row['location'] = row['district'] return rows