Skip to content

Feb 10 change to ldap_attribute_store.py broke 'no ldap record found'. #488

Open
@aaschenbrener

Description

@aaschenbrener

Previously there was a section of code that started on line 586 which handles whether or not an LDAP record was found. It takes the following format.

if record:
    ...
else:
   ...

On the commit found here: 4b9c83b
That got nested under a for loop in attempt to process multiple records like such:

for record in responses:
    if record:
        ...
    else:
        ...

The problem is that if no record exists in responses, the else clause will never be executed, because the for loop will be entirely skipped.

It's likely that it was intended to be something like below instead.

if responses:
    for record in responses:
        ...
else:
    ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions