diff options
author | Magnus Hagander | 2019-07-10 20:40:06 +0000 |
---|---|---|
committer | Magnus Hagander | 2019-07-10 20:40:06 +0000 |
commit | df9fe517efea219490bf26061dbef9384d3c5736 (patch) | |
tree | f95118896f6eca92ae22987790e8abf1aa6afca1 /postgresqleu/util/backendlookups.py | |
parent | 44eb63bd041ceed2af9ec499ee80da813a620942 (diff) |
Ensure email addresses are lowercase throughout
At least all email addresses being input by end users should be
confverted to lowercase to avoid duplicates.
Update existing users, registrations and election candidates to be
lowercase, and add constraints to them
For things like conference contract addresses that are only set by
superusers, we skip the constraints part and let the user take some more
responsibility.
Diffstat (limited to 'postgresqleu/util/backendlookups.py')
-rw-r--r-- | postgresqleu/util/backendlookups.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/postgresqleu/util/backendlookups.py b/postgresqleu/util/backendlookups.py index 136cbbfa..e476f202 100644 --- a/postgresqleu/util/backendlookups.py +++ b/postgresqleu/util/backendlookups.py @@ -53,7 +53,7 @@ class GeneralAccountLookup(LookupBase): { 'id': u.id, 'value': '{0} {1} ({2})'.format(u.first_name, u.last_name, u.username), - 'email': u.email, + 'email': u.email.lower(), } for u in User.objects.filter( Q(username__icontains=query) | Q(first_name__icontains=query) | Q(last_name__icontains=query) |