Skip to content

Conversation

@mrs83
Copy link

@mrs83 mrs83 commented Mar 20, 2018

  • Handle "aggregate_select" deprecated method from django.db.sql.query.Query.
  • Make "reverse" import compatible for both versions 1.10 and 2.0.

- Handle "aggregate_select" deprecated method from django.db.sql.query.Query.
- Import "reverse" compatible with both versions 1.10 and 2.0.

if hasattr(v_qs.query, 'aggregate_select'):
# Django < 1.10
headers.extend(v_qs.query.aggregate_select)
Copy link

@stianpr stianpr Apr 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it has been renamed AFAICS. So we should still use it for >= 1.10, but with the name annotation_select.

I'm not the owner of this repo, but it would be nice to get this PR in when updated.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reminder 👍

@mrs83 mrs83 changed the title Fix Django 1.10 and 2.0 compatibility Fix Django 1.10 and 2.0 compatibility (WIP) Apr 13, 2018
@mrs83 mrs83 changed the title Fix Django 1.10 and 2.0 compatibility (WIP) Fix Django 1.10 and 2.0 compatibility May 16, 2018
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.

2 participants