We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c97542b commit 7f264f3Copy full SHA for 7f264f3
1 file changed
every_election/apps/organisations/models/divisions.py
@@ -127,10 +127,10 @@ def format_geography_link(self):
127
except (ValueError, AttributeError):
128
return None
129
130
- if code_type.lower() != "gss":
+ if code_type.lower() not in ("gss", "unit_id"):
131
132
133
- return "https://mapit.mysociety.org/area/{}".format(code)
+ return f"https://mapit.mysociety.org/code/{code_type}/{code}"
134
135
136
class DivisionGeography(models.Model):
0 commit comments