mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 04:34:29 +08:00
Fix ForeignKey type for self-reference defined in the abstract model (#200)
This commit is contained in:
@@ -219,7 +219,7 @@ class NewSemanalDjangoPlugin(Plugin):
|
||||
|
||||
def get_base_class_hook(self, fullname: str
|
||||
) -> Optional[Callable[[ClassDefContext], None]]:
|
||||
if (fullname in self.django_context.model_base_classes
|
||||
if (fullname in self.django_context.all_registered_model_class_fullnames
|
||||
or fullname in self._get_current_model_bases()):
|
||||
return partial(transform_model_class, django_context=self.django_context)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user