From 927371b908f1bba34cc08d7d6c24f734fce83837 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 24 Feb 2023 13:54:39 -0500 Subject: [PATCH] Adjust inspector to accommodate non-detail views --- netbox/utilities/custom_inspectors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/utilities/custom_inspectors.py b/netbox/utilities/custom_inspectors.py index 25358535d..7cf9fe02f 100644 --- a/netbox/utilities/custom_inspectors.py +++ b/netbox/utilities/custom_inspectors.py @@ -18,7 +18,7 @@ class NetBoxSwaggerAutoSchema(SwaggerAutoSchema): if not operation_id: # Overwrite the action for bulk update/bulk delete views to ensure they get an operation ID that's # unique from their single-object counterparts (see #3436) - if operation_keys[-1] in ('delete', 'partial_update', 'update') and not self.view.detail: + if operation_keys[-1] in ('delete', 'partial_update', 'update') and not getattr(self.view, 'detail', None): operation_keys[-1] = f'bulk_{operation_keys[-1]}' operation_id = '_'.join(operation_keys)