diff --git a/augur/curate/parse_genbank_location.py b/augur/curate/parse_genbank_location.py index 35c55aa2d..cbf70f023 100644 --- a/augur/curate/parse_genbank_location.py +++ b/augur/curate/parse_genbank_location.py @@ -69,18 +69,8 @@ def run( records: List[dict], ) -> Generator[dict, None, None]: for record in records: - database = record.get("database", "") - if database in {"GenBank", "RefSeq"}: - parse_location( - record, - args.location_field, - ) - else: - if database: - error_msg = f"""Database value of {database} not supported for `transform-genbank-location`; must be "GenBank" or "RefSeq".""" - else: - error_msg = "Record must contain `database` field to use `transform-genbank-location.`" - - print_err(error_msg) - + parse_location( + record, + args.location_field, + ) yield record diff --git a/tests/functional/curate/cram/parse-genbank-location/errors.t b/tests/functional/curate/cram/parse-genbank-location/errors.t index fa01784e7..4f973cae8 100644 --- a/tests/functional/curate/cram/parse-genbank-location/errors.t +++ b/tests/functional/curate/cram/parse-genbank-location/errors.t @@ -2,20 +2,6 @@ Setup $ export AUGUR="${AUGUR:-$TESTDIR/../../../../../bin/augur}" -Records without a `database` field result in the expected warning - - $ echo '{"geo_loc_name":"Canada:Vancouver"}' \ - > | ${AUGUR} curate parse-genbank-location - Record must contain `database` field to use `transform-genbank-location.` - {"geo_loc_name": "Canada:Vancouver"} - -Records with a `database` field with an unsupported value result in the expected warning - - $ echo '{"geo_loc_name":"Canada:Vancouver", "database":"database"}' \ - > | ${AUGUR} curate parse-genbank-location - Database value of database not supported for `transform-genbank-location`; must be "GenBank" or "RefSeq". - {"geo_loc_name": "Canada:Vancouver", "database": "database"} - Records without a `location` field result in the expected warning $ echo '{"database":"GenBank"}' \