Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize project with latest versions of Python & Django #6

Merged
merged 17 commits into from
Jan 30, 2024

Conversation

sandre35
Copy link

No description provided.

bd808 and others added 17 commits February 24, 2021 21:26
Guard against issues with a non-empty default QuerySet returned by
a Model's Manager instance by calling the Model's _base_manager when
doing lookups by dn. LDAP lookups by dn must be done by setting the dn
as the base of the LDAP query.

The current method for determining if a dn lookup is being requested
relies on inspecting the generated django.db.models.sql.query.Query and
looking for a 'dn' target column in the first where clause statement. If
a Model uses a custom Manager to append a where clause statement to all
QuerySets, this logic is broken. Using _base_manager instead of objects
as the Manager for constructing explicit dn lookups avoids this problem.
This behavior also matches the Django documentation and internals for
related object access, so it is likely to continue to work for the
foreseeable future.

Fixes django-ldapdb#196
Openldap's backend changed from hdb (2.4) to mdb (2.5).
Setting default value changes from False (Django 3.2) to True (Django 4.0).
Setting deprecated in Django 4.0
@sandre35 sandre35 requested a review from RemiCardona January 22, 2024 10:25
@RemiCardona RemiCardona merged commit 9362672 into master Jan 30, 2024
12 checks passed
@RemiCardona RemiCardona deleted the sandre/modernize branch January 30, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants