`as_manager` on QuerySet should pass down `use_in_migrations` to new Manager instance
When using the convenience method as_manager on a QuerySet the attribute is_in_migrations (https://docs.djangoproject.com/en/1.9/topics/migrations/#model-managers) is currently not passed down. This means that when creating a migration the Managers which a created from QuerySets won't be serialised into the migration. The current workaround would be to create Manager class from the QuerySet, thereby using the old approach where QuerySet.as_manager isn't used.
Change History
(6)
| Needs tests: |
set
|
| Triage Stage: |
Unreviewed → Accepted
|
| Owner: |
changed from nobody to Oliver Newman
|
| Status: |
new → assigned
|
| Component: |
Database layer (models, ORM) → Migrations
|
| Type: |
Bug → New feature
|
| Version: |
1.10 → master
|
| Patch needs improvement: |
set
|
| Owner: |
Oliver Newman removed
|
| Status: |
assigned → new
|
| Cc: |
Ülgen Sarıkavak added
|
The PR needs a test.