Changeset f612be5 for asadb/groups


Ignore:
Timestamp:
Feb 11, 2014, 3:30:27 AM (13 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, stable, stage
Children:
7ffd1d4
Parents:
ff71c3a
git-author:
Alex Dehnert <adehnert@…> (02/11/14 03:30:27)
git-committer:
Alex Dehnert <adehnert@…> (02/11/14 03:30:27)
Message:

Reporting: Handle weird casing better when finding names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/views.py

    rb523fed rf612be5  
    12891289        name_map = collections.defaultdict(lambda: ('???', '???'))
    12901290        if nf_need_name:
    1291             people_usernames = people_data.values('person')
     1291            people_usernames = [p.person.lower() for p in people_data]
    12921292            name_data = groups.models.AthenaMoiraAccount.objects.filter(username__in=people_usernames)
    12931293            for account in name_data:
    1294                 name_map[account.username] = (account.first_name, account.last_name)
     1294                name_map[account.username.lower()] = (account.first_name, account.last_name)
    12951295
    12961296        # Set up special fields
     
    13171317                if nf_need_name:
    13181318                    def fmt(p):
    1319                         first, last = name_map[p]
     1319                        first, last = name_map[p.lower()]
    13201320                        ctx = {'user': p, 'first': first, 'last': last}
    13211321                        return nf_fmt % ctx
Note: See TracChangeset for help on using the changeset viewer.