Misreported related fields missing managers #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have made things!
Hi! I'm having issues with the package resolving related managers when defining custom Managers and Querysets. This is definitely an issue with the package and to illustrate it better I added two test cases.
First case presents no issues. We're adding a custom QuerySet and plugging it into two related model in a base class using the default
objectsmanager and theas_manager()method interface of QuerySets. It's all resolved fine and there are no errors - why this is important will be clearer with the 2nd case.The second test case is a bit more complex in that we're tweaking the resulting manager in the
as_manager. The way it's plugged into the model however doesn't change from the 1st case. Moreover, the manager itself isn't doing much, and it inherits from the default Django manager as well. The problem is that we're now getting two errors from the[django-manager-missing]check which is quite surprising.The problem is ocurring for me in a medium sized codebase with hundreds of models managed through a shared base class and manager classes. I wouldn't say the intention is overly complex, neither is the implementation, and the fact is that Django's working perfectly fine with it and has no issues setting up the models and managers.
Related issues
Related issues & changes
typeddjango#969
typeddjango#993
typeddjango#2224