Skip to content

Commit

Permalink
fix: use pre defined member (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
premac authored Oct 6, 2023
1 parent 475508b commit 4f191f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions casbin/util/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, expr, functions=None):
super(SimpleEval, self).__init__(functions=functions)
if expr != "":
self.expr = expr
self.expr_parsed_value = ast.parse(expr.strip()).body[0].value
self.ast_parsed_value = ast.parse(expr.strip()).body[0].value

def eval(self, names=None):
"""evaluate an expresssion, using the operators, functions and
Expand All @@ -40,4 +40,4 @@ def eval(self, names=None):
if names:
self.names = names

return self._eval(self.expr_parsed_value)
return self._eval(self.ast_parsed_value)

0 comments on commit 4f191f0

Please sign in to comment.