Update auditlog/middleware.py

This commit is contained in:
Hasan Ramezani 2024-03-26 12:46:21 +01:00 committed by GitHub
parent 693a5092be
commit 908fc4a425
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,7 +17,7 @@ class AuditlogMiddleware:
settings, "AUDITLOG_DISABLE_REMOTE_ADDR", False
)
if not isinstance(self.disable_remote_addr, bool):
raise ValueError("Setting 'AUDITLOG_DISABLE_REMOTE_ADDR' must be a boolean")
raise TypeError("Setting 'AUDITLOG_DISABLE_REMOTE_ADDR' must be a boolean")
@staticmethod
def _get_remote_addr(request):