Skip to content

Using _default_manager instead of objects#205

Open
ChickenF622 wants to merge 4 commits into
wagtail:mainfrom
ChickenF622:main
Open

Using _default_manager instead of objects#205
ChickenF622 wants to merge 4 commits into
wagtail:mainfrom
ChickenF622:main

Conversation

@ChickenF622

Copy link
Copy Markdown

Fixes #115

@gasman

gasman commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Thanks @ChickenF622! Please can you add a test for this (or at least provide an example of a model where the regular objects manager would fail)?

@ChickenF622

Copy link
Copy Markdown
Author

Yeah I'll get a test added for this shortly.

@ChickenF622

Copy link
Copy Markdown
Author

Added a custom manager to the Author model which before my changes would throw an error. I had to adjust the tests to use ._default_manager in the setup, otherwise the tests would fail outright. If you would prefer I create models specific to test this let me know.

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.

_default_manager should be used instead of objects

2 participants