model._meta.app_config.models_module
seems to be None
for these models, making the following code failing:
|
def model_imports(self) -> list[ImportItem]: |
|
"""A list of `ImportItem` instances. |
|
|
|
Can be used to easily import all models in a stub file. |
|
""" |
|
|
|
return [ |
|
ImportItem( |
|
module_name=model._meta.app_config.models_module.__name__, |