From 83c0d59d50805e8bf09daac9df2649c2a2a90763 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 23 Aug 2011 16:16:03 +0530 Subject: [PATCH] removed eval --- hr/doctype/leave_allocation/leave_allocation.py | 2 +- hr/doctype/leave_application/leave_application.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hr/doctype/leave_allocation/leave_allocation.py b/hr/doctype/leave_allocation/leave_allocation.py index 46f78094a3..12fe37a85b 100755 --- a/hr/doctype/leave_allocation/leave_allocation.py +++ b/hr/doctype/leave_allocation/leave_allocation.py @@ -75,7 +75,7 @@ class DocType: # get total allocated leaves # --------------------------- def get_total_allocated_leaves(self): - leave_det = eval(self.get_carry_forwarded_leaves()) + leave_det = self.get_carry_forwarded_leaves() set(self.doc,'carry_forwarded_leaves',flt(leave_det['carry_forwarded_leaves'])) set(self.doc,'total_leaves_allocated',flt(leave_det['total_leaves_allocated'])) diff --git a/hr/doctype/leave_application/leave_application.py b/hr/doctype/leave_application/leave_application.py index 01bf7fec50..1756f2a7ca 100755 --- a/hr/doctype/leave_application/leave_application.py +++ b/hr/doctype/leave_application/leave_application.py @@ -82,7 +82,7 @@ class DocType: if not self.is_lwp(): bal = self.get_leave_balance() tot_leaves = self.get_total_leave_days() - bal, tot_leaves = eval(bal), eval(tot_leaves) + bal, tot_leaves = bal, tot_leaves set(self.doc,'leave_balance',flt(bal['leave_balance'])) set(self.doc,'total_leave_days',flt(tot_leaves['total_leave_days'])) if flt(bal['leave_balance']) < flt(tot_leaves['total_leave_days']):