From aa3e0a38132a212f6cbf4908cd2978b405a5964c Mon Sep 17 00:00:00 2001 From: BustDot Date: Sat, 29 Jul 2023 21:56:50 +0800 Subject: [PATCH] fix: remove unused argument enable_log (#20) --- README.md | 3 --- casbin_adapter/enforcer.py | 1 - 2 files changed, 4 deletions(-) diff --git a/README.md b/README.md index 6ac3278..c79296a 100644 --- a/README.md +++ b/README.md @@ -69,9 +69,6 @@ def hello(request): ### `CASBIN_MODEL` A string containing the file location of your casbin model. -### `CASBIN_LOG_ENABLED` -If `True`, enables logging. `False` by default. - ### `CASBIN_ADAPTER` A string containing the adapter import path. Defaults to the django adapter shipped with this package: `casbin_adapter.adapter.Adapter` diff --git a/casbin_adapter/enforcer.py b/casbin_adapter/enforcer.py index 6ae2003..0488bf7 100644 --- a/casbin_adapter/enforcer.py +++ b/casbin_adapter/enforcer.py @@ -25,7 +25,6 @@ def _load(self): logger.info("Performing deferred casbin enforcer initialisation") self._initialized = True model = getattr(settings, "CASBIN_MODEL") - enable_log = getattr(settings, "CASBIN_LOG_ENABLED", False) adapter_loc = getattr(settings, "CASBIN_ADAPTER", "casbin_adapter.adapter.Adapter") adapter_args = getattr(settings, "CASBIN_ADAPTER_ARGS", tuple()) Adapter = import_class(adapter_loc)