Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

!= in policies is replaced with not= #368

Open
sanguinedab opened this issue Feb 7, 2025 · 0 comments
Open

!= in policies is replaced with not= #368

sanguinedab opened this issue Feb 7, 2025 · 0 comments

Comments

@sanguinedab
Copy link

When I define a policy, the != symbol is replaced by not=

I tested it with an online editor and it was normal, but it might be because it is a nodejs version
Image

I got an error when using it in Python code. I checked the source code and it is probably caused by here. It replaces all '!' with 'not'

`
@staticmethod
def _get_expression(expr, functions=None):
expr = expr.replace("&&", "and")
expr = expr.replace("||", "or")
expr = expr.replace("!", "not")

  return SimpleEval(expr, functions)

`

Is there any good solution? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant