Skip to content

Commit

Permalink
Use pydantic model name as default title value
Browse files Browse the repository at this point in the history
  • Loading branch information
fullonic committed Jan 12, 2023
1 parent bf9a8e8 commit c34b011
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ async def _from_queryset(self, func, modelcls, args, kwargs):

model_config = getattr(modelcls, "Config", None)
if model_config:
model_title = getattr(modelcls.Config, "title")
model_title = getattr(modelcls.Config, "title", modelcls.__name__)
if model_title:
span_attributes["pydantic.model"] = model_title

Expand Down

0 comments on commit c34b011

Please sign in to comment.