From 48fe85047f01d6dd2c62e9dea9b7ab6783ba72c5 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Tue, 2 Mar 2021 14:04:10 -0800 Subject: [PATCH] Adding some logic to not show the vacciene numbers for non-us terrirories --- app/corona.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/corona.py b/app/corona.py index ac4f0304..9a0b285d 100644 --- a/app/corona.py +++ b/app/corona.py @@ -64,8 +64,9 @@ def sum_numbers(location): embed.add_field(name=':rotating_light: Confirmed Cases :rotating_light:', value=confirmed, inline=False) embed.add_field(name=':hospital: Recovered Cases :hospital:', value=recovered, inline=False) embed.add_field(name=':skull_crossbones: Deaths :skull_crossbones:', value=deaths, inline=False) - embed.add_field(name=':sparkles: :syringe: NEW!: Percent vaccinated :syringe: :sparkles:', value=get_vaccination_data(location), inline=False) - embed.add_field(name='Source', value="https://github.com/CSSEGISandData/COVID-19\nVaccination numbers pulled from\nhttps://covidvaxcount.live") + if 'Not available' not in get_vaccination_data(location): + embed.add_field(name=':sparkles: :syringe: Percent vaccinated :syringe: :sparkles:', value=get_vaccination_data(location) + "\nVaccination numbers pulled from\nhttps://covidvaxcount.live", inline=False) + embed.add_field(name='Source', value="https://github.com/CSSEGISandData/COVID-19") return embed