def get_company(company_name): memory_storage = get_vault()["memory_storage"] for company in memory_storage.get_companies(): if company.lower() == company_name.lower(): return json.dumps( {"company": {"id": company_name, "text": memory_storage.get_original_company_name(company_name)}} ) return json.dumps({})
def get_company(company_name): memory_storage = get_vault()['memory_storage'] for company in memory_storage.get_companies(): if company.lower() == company_name.lower(): return { 'id': company_name, 'text': memory_storage.get_original_company_name(company_name) } flask.abort(404)
def get_company(company_name): memory_storage = get_vault()['memory_storage'] for company in memory_storage.get_companies(): if company.lower() == company_name.lower(): return json.dumps({ 'company': { 'id': company_name, 'text': memory_storage.get_original_company_name( company_name)} }) return json.dumps({})
def get_company(company_name): memory_storage = get_vault()['memory_storage'] for company in memory_storage.get_companies(): if company.lower() == company_name.lower(): return json.dumps({ 'company': { 'id': company_name, 'text': memory_storage.get_original_company_name(company_name) } }) return json.dumps({})