Skip to content

Commit

Permalink
Return the state case the city was not found
Browse files Browse the repository at this point in the history
  • Loading branch information
luismalta committed Oct 28, 2019
1 parent 7e5f5a0 commit b504a2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion workalendar/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ def get_calendar_class(self, iso_code):
# Search for region and subregion
if iso_code in k:
subregion = v
if code_elements[0] in k:
if code_elements[1] == 'IBGE':
if iso_code[:10] in k:
region = v
elif code_elements[0] in k:
region = v
if subregion:
# subregion is in region_registry
Expand Down

0 comments on commit b504a2e

Please sign in to comment.