mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 17:26:10 -06:00
fixed model name
This commit is contained in:
parent
be81143a26
commit
6c43d87d22
@ -255,10 +255,8 @@ class NetBoxAutoSchema(AutoSchema):
|
|||||||
else:
|
else:
|
||||||
is_list = True
|
is_list = True
|
||||||
|
|
||||||
description = self.view.__class__.__name__
|
model_name = self.view.queryset.model._meta.verbose_name
|
||||||
if description.endswith('ViewSet'):
|
|
||||||
description = description[:-len('ViewSet')]
|
|
||||||
|
|
||||||
if is_list:
|
if is_list:
|
||||||
return f"{self.method.capitalize()} a list of {description} objects."
|
return f"{self.method.capitalize()} a list of {model_name} objects."
|
||||||
return f"{self.method.capitalize()} a {description} object."
|
return f"{self.method.capitalize()} a {model_name} object."
|
||||||
|
Loading…
Reference in New Issue
Block a user