Changeset bfc0d08


Ignore:
Timestamp:
Feb 11, 2014, 1:59:21 AM (12 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, stable, stage
Children:
4217b13
Parents:
3b39edc
git-author:
Alex Dehnert <adehnert@…> (02/11/14 01:56:31)
git-committer:
Alex Dehnert <adehnert@…> (02/11/14 01:59:21)
Message:

People lookup: handle round numbers (ASA-#253)

It turns out that failure to split on commas isn't actually the cause of
ASA-#253 (though it is certainly a usability issue); instead, if we have 100*n
Athena usernames (most likely, zero), we end up with an empty "chunk" of
usernames to send to the LDAP server. That results in a filter like "(|)",
which errors. This changes the code to suppress empty chunks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/forms/models.py

    r3b39edc rbfc0d08  
    234234            username_chunks.append(usernames[start:end])
    235235            start = end
    236         username_chunks.append(usernames[end:])
    237         print username_chunks
     236        extra = usernames[end:]
     237        if extra:
     238            username_chunks.append(extra)
    238239
    239240        results = []
Note: See TracChangeset for help on using the changeset viewer.