mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-13 23:41:55 +08:00
Fix missing related managers on some models (#902)
* Fix missing related managers on some models I was seeing an issue where some related managers were missing from some models. Traced the issue down to this line, where it appears that if we hit a relation with a non-default(?) reverse manager the iteration stopped. I _think_ this is supposed to be a continue statement instead. It appears to work in the project I'm working in at least. * Add test case * Add test case
This commit is contained in:
@@ -363,7 +363,7 @@ class AddRelatedManagers(ModelClassInitializer):
|
||||
self.add_new_node_to_model_class(
|
||||
attname, Instance(default_reverse_manager_info, []), no_serialize=True
|
||||
)
|
||||
return
|
||||
continue
|
||||
|
||||
# The reverse manager we're looking for doesn't exist. So we create it.
|
||||
# The (default) reverse manager type is built from a RelatedManager and the default manager on the related model
|
||||
|
||||
Reference in New Issue
Block a user