Skip to content

Commit 7111a0e

Browse files
committed
correct summary file geo-loc and submitter country details
1 parent f837f8f commit 7111a0e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

gget/gget_virus.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3549,7 +3549,7 @@ def save_command_summary(
35493549
# Unique geographic locations
35503550
locations = set()
35513551
for meta in filtered_metadata:
3552-
location = meta.get('location', {}).get('geographic_location') if isinstance(meta.get('location'), dict) else None
3552+
location = meta.get('location')
35533553
if location:
35543554
locations.add(location)
35553555
f.write(f"Unique geographic locations: {len(locations)}\n")
@@ -3591,11 +3591,9 @@ def save_command_summary(
35913591
# Submitter countries
35923592
countries = set()
35933593
for meta in filtered_metadata:
3594-
submitter = meta.get('submitter', {})
3595-
if isinstance(submitter, dict):
3596-
country = submitter.get('country')
3597-
if country:
3598-
countries.add(country)
3594+
country = meta.get('submitterCountry')
3595+
if country:
3596+
countries.add(country)
35993597
f.write(f"Unique submitter countries: {len(countries)}\n")
36003598
if countries and len(countries) <= 20:
36013599
for country in sorted(countries):

0 commit comments

Comments
 (0)