removed eval

This commit is contained in:
Nabin Hait 2011-08-23 16:16:03 +05:30
parent ec72365f91
commit 83c0d59d50
2 changed files with 2 additions and 2 deletions

View File

@ -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']))

View File

@ -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']):