Revert "feat: Allow utils inside Energy Point Rule condition " (#8152)

Revert "feat: Allow utils inside Energy Point Rule condition "
This commit is contained in:
Aditya Hase 2019-08-09 15:06:24 +05:30 committed by GitHub
commit c4de05ec64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,10 +18,7 @@ class EnergyPointRule(Document):
frappe.cache_manager.clear_doctype_map('Energy Point Rule', self.name)
def apply(self, doc):
whitelisted_globals = {
'utils': frappe.utils
}
if frappe.safe_eval(self.condition, whitelisted_globals, {'doc': doc.as_dict()}):
if frappe.safe_eval(self.condition, None, {'doc': doc.as_dict()}):
multiplier = 1
if self.multiplier_field: