Update schema.py

This commit is contained in:
Abhimanyu Saharan 2023-04-12 12:42:20 +05:30 committed by GitHub
parent 6c43d87d22
commit 3808a2735f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -247,13 +247,7 @@ class NetBoxAutoSchema(AutoSchema):
"""
# Determine if the method is for list or detail.
if self.is_bulk_action:
is_list = True
# Determine using the URL path if the method is for list or detail.
elif '{id}' in self.path:
is_list = False
else:
is_list = True
is_list = not '{id}' in self.path
model_name = self.view.queryset.model._meta.verbose_name