fix: validate python expressions (#26835) (#26856)

(cherry picked from commit 07337d5c78)

Co-authored-by: Ankush <ankush@iwebnotes.com>
This commit is contained in:
Frappe PR Bot 2021-08-09 14:48:59 +05:30 committed by GitHub
parent e7a77d9cb1
commit ea83e2b45f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -558,7 +558,8 @@
"description": "Simple Python Expression, Example: territory != 'All Territories'",
"fieldname": "condition",
"fieldtype": "Code",
"label": "Condition"
"label": "Condition",
"options": "PythonExpression"
},
{
"fieldname": "column_break_42",
@ -575,7 +576,7 @@
"icon": "fa fa-gift",
"idx": 1,
"links": [],
"modified": "2021-03-06 22:01:24.840422",
"modified": "2021-08-06 15:10:04.219321",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",

View File

@ -47,7 +47,8 @@
"description": "Simple Python formula applied on Reading fields.<br> Numeric eg. 1: <b>reading_1 &gt; 0.2 and reading_1 &lt; 0.5</b><br>\nNumeric eg. 2: <b>mean &gt; 3.5</b> (mean of populated fields)<br>\nValue based eg.: <b>reading_value in (\"A\", \"B\", \"C\")</b>",
"fieldname": "acceptance_formula",
"fieldtype": "Code",
"label": "Acceptance Criteria Formula"
"label": "Acceptance Criteria Formula",
"options": "PythonExpression"
},
{
"default": "0",
@ -89,7 +90,7 @@
"idx": 1,
"istable": 1,
"links": [],
"modified": "2021-02-04 18:50:02.056173",
"modified": "2021-08-06 15:08:20.911338",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Quality Inspection Parameter",