Parcourir la source

[fix] Added round function in the safe_eval method

version-14
Rohit Waghchaure il y a 8 ans
Parent
révision
6d7808c550
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. +3
    -2
      frappe/__init__.py

+ 3
- 2
frappe/__init__.py Voir le fichier

@@ -1327,9 +1327,10 @@ def safe_eval(code, eval_globals=None, eval_locals=None):
whitelisted_globals = {
"int": int,
"float": float,
"long": long
"long": long,
"round": round
}
if '__' in code:
throw('Illegal rule {0}. Cannot use "__"'.format(bold(code)))



Chargement…
Annuler
Enregistrer