Always put HM Government at the top of the list

It’s the default, so we should treat it the same way we treat GOV.UK in
the email branding selection.
This commit is contained in:
Chris Hill-Scott
2018-11-05 13:34:26 +00:00
parent 65cc6adabf
commit c960fef8f8
2 changed files with 8 additions and 6 deletions

View File

@@ -1,7 +1,6 @@
import weakref
from datetime import datetime, timedelta
from itertools import chain
from operator import itemgetter
import pytz
from flask_wtf import FlaskForm as Form
@@ -788,7 +787,10 @@ class LetterBranding(StripWhitespaceForm):
super().__init__(*args, **kwargs)
self.dvla_org_id.choices = list(sorted(
choices,
key=itemgetter(1),
key=lambda choice: (
choice[0] != '001',
choice[1],
),
))
dvla_org_id = RadioField(