You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a GenericRelation field that uses a deferred string argument rather than an a class argument, documentation build fails with:
Extension error (sphinxcontrib_django.docstrings):
Handler <function improve_docstring at 0x00000123AE286EE0> for event 'autodoc-process-docstring' threw an exception (exception: 'str' object has no attribute '_meta')
Through the debugger, I narrowed the issue down to here, where the format string argument fails because field.model is a string ("app2.ModelB" in the example code below)
If you have a GenericRelation field that uses a deferred string argument rather than an a class argument, documentation build fails with:
Through the debugger, I narrowed the issue down to here, where the format string argument fails because
field.model
is a string ("app2.ModelB"
in the example code below)https://github.com/edoburu/sphinxcontrib-django/blob/872cb8d56df8d76315a233ba8a2af3d9cce23b1c/sphinxcontrib_django/docstrings/field_utils.py#L83
Example code:
I have a fix incoming that deals with this.
The text was updated successfully, but these errors were encountered: