16992 remove TODO for NetBox 4.1 (#16993)

* 16992 remove TODO for NetBox 4.1

* 16992 fix custom validator

* Remove obsolete LegacyScriptRedirectView

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Arthur Hanson
2024-07-26 20:46:16 +07:00
committed by GitHub
parent 22319b2cce
commit 0a1ce79154
7 changed files with 2 additions and 50 deletions

View File

@@ -123,13 +123,7 @@ class CustomValidator:
)
# Execute custom validation logic (if any)
# TODO: Remove in v4.1
# Inspect the validate() method, which may have been overridden, to determine
# whether we should pass the request (maintains backward compatibility for pre-v4.0)
if 'request' in inspect.signature(self.validate).parameters:
self.validate(instance, request)
else:
self.validate(instance)
self.validate(instance, request)
@staticmethod
def _get_request_attr(request, name):