Skip to content

Commit

Permalink
fix: enforce_ex now works fine when it was disabled
Browse files Browse the repository at this point in the history
Signed-off-by: Zxilly <zhouxinyu1001@gmail.com>
  • Loading branch information
Zxilly committed May 23, 2021
1 parent 40e7f00 commit 15f58c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions casbin/core_enforcer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def init_with_model_and_adapter(self, m, adapter=None):
self.adapter = adapter

self.model = m
m.logger = self.logger
m.logger = self.logger
self.model.print_model()
self.fm = FunctionMap.load_function_map()

Expand Down Expand Up @@ -253,7 +253,7 @@ def enforce_ex(self, *rvals):
"""

if not self.enabled:
return False
return [False, []]

functions = self.fm.get_functions()

Expand Down

0 comments on commit 15f58c9

Please sign in to comment.