-
Notifications
You must be signed in to change notification settings - Fork 900
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
Miq Expression execution fails with operator token not supported #16514
Comments
@gtanzillo @imtayadeway |
@mkanoor can you elaborate on where/why this is happening? |
@imtayadeway
When the substitution happens user_input is replaced with the runtime value, but the :token is not removed. This all works fine if the expression only contains SQL table columns, if the expression contains a custom attribute or virtual column then the check for sql column ends up deleting the first half of the expression leaving the token in the key and tripping on the :token |
#17215 should resolve this issue |
Fixed with #17215 |
issue was not fully resolved, |
The following MiqExpression built from Automate Methods on a custom attribute causes a failure at execution time.
The :token is added during expression substitution
The :token is added during expression substitution.
If the expression cannot be handled by SQL we end up deleting the expression but leave the :token key in the hash and when it comes to resolve the next piece it sees :token as an invalid operator and raises an exception. If we delete the expression because it cannot be handled we also need to delete the associated :token key.
https://github.com/ManageIQ/manageiq/blob/master/lib/miq_expression.rb#L315
The text was updated successfully, but these errors were encountered: