-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Calculations: Python built-in functions not available #554
Comments
Hi @grulisco, I think we fixed that already in #457. Did you encounter this issue on your server or on https://senaite.ridingbytes.com |
Hello @ramonski, #457 was another problem with calling functions in modules, that were available while testing in calc setup but not in real ASs IIRC. |
Yes, you're right, I missed some of the
Not sure if we can have |
Please add
|
Most of the Python standard builtins added |
Steps to reproduce
Create or edit a calculation
Use a python function like round(123.123,1) or any other built-in function
(see https://docs.python.org/2/library/functions.html)
Current behavior
error in the test result area:
Expected behavior
Show the calculated result.
Note:
Senaite supports python-syntax in calculations. Arithmetic (+-*/), logical (... if ... else ...) and string operators are working properly as I can see.
We can address functions in python modules (e.g. math) or are able to develop own functions in a separate calculations module.
It seems incomprehensible that pythons built-in functions are unusable as a exception.
@ramonski did a workaround and encapsuled my desired function in our module, but this should work without doing this in advance.
Mostly LabManagers should be able to create calculations and logic inside the LIMS without having admin access to the plone installation.
The text was updated successfully, but these errors were encountered: