Skip to content

Commit e937f49

Browse files
committed
Copy model docstring if no doc exists
1 parent 0865253 commit e937f49

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

graphene_pydantic/objecttype.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ def __init_subclass_with_meta__(
8686
if not registry:
8787
registry = get_global_registry(PydanticObjectType)
8888

89-
cls.__doc__ = model.__doc__
89+
if not cls.__doc__:
90+
cls.__doc__ = model.__doc__
9091

9192
pydantic_fields = yank_fields_from_attrs(
9293
construct_fields(

0 commit comments

Comments
 (0)