Skip to content

Django 5.1+ compatibility for PolymorphicQuerySet._process_aggregate_args() #629

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

Closed
wants to merge 2 commits into from

Conversation

LeGast00n
Copy link
Contributor

Since Django v5.1, django.db.models.Aggregate.get_source_expressions() can have None as item in the returned list, causing the final assert to fail.

LeGast00n and others added 2 commits March 16, 2025 12:28
Since Django v5.1, django.db.models.Aggregate.get_source_expressions() can have None as item in the returned list, causing the final assert to fail
@LeGast00n LeGast00n changed the title Django 5.1+ compatibility for Query._process_aggregate_args() Django 5.1+ compatibility for PolymorphicQuerySet._process_aggregate_args() Mar 16, 2025
@khink
Copy link
Contributor

khink commented Apr 22, 2025

@LeGast00n Your MR looks very nice. i was running into this error myself on Django 5.2. Could you maybe fix the failing ruff check, so it can be merged?

@bckohan IS anything else needed to get this merged?

@bckohan
Copy link
Contributor

bckohan commented Apr 30, 2025

@khink @LeGast00n a test would be very helpful!

khink pushed a commit to fourdigits/django-polymorphic that referenced this pull request May 1, 2025
Since Django v5.1, django.db.models.Aggregate.get_source_expressions() can
have None as item in the returned list, causing the final assert to fail

This patch provided by LeGast00n in jazzband#629
@bckohan
Copy link
Contributor

bckohan commented May 1, 2025

superseded by #638

@bckohan bckohan closed this May 1, 2025
bckohan pushed a commit that referenced this pull request May 1, 2025
Since Django v5.1, django.db.models.Aggregate.get_source_expressions() can
have None as item in the returned list, causing the final assert to fail

This patch provided by LeGast00n in #629
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.

3 participants