Skip to content

Commit

Permalink
Feat: add additional check for valid group
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickm663 committed Jan 24, 2024
1 parent dafe340 commit ff6a847
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ function is_valid(country::String, tbl::String, grp::String)::Bool
# check whether user has provided short-form or long-form name
table_check = tbl keys(get_tables()) || tbl values(get_tables())
if table_check
return table_check
group_check = grp get_groups()
if group_check
return group_check
else
@error "Invalid group: see HMD.get_groups() for a full list of valid groups"
return group_check
end
else
@error "Invalid table: see HMD.get_tables() for a full list of valid tables"
return table_check
Expand Down

0 comments on commit ff6a847

Please sign in to comment.