Skip to content

Commit

Permalink
Look up areas by local-authority-eng CodeType
Browse files Browse the repository at this point in the history
  • Loading branch information
symroe committed Dec 5, 2016
1 parent db08a16 commit 06cc1ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mapit_gb/countries.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def area_code_lookup(request, area_code, format):
area_code_type = CodeType.objects.get(code='ons')
elif re.match('[ENSW]\d{8}$', area_code):
area_code_type = CodeType.objects.get(code='gss')
elif re.match('[A-Za-z]{3}$', area_code):
area_code_type = CodeType.objects.get(code='local-authority-eng')
if not area_code_type:
return None

Expand Down

0 comments on commit 06cc1ff

Please sign in to comment.