Fixed as_dict of employee.py

This commit is contained in:
Anand Doshi 2014-04-28 16:51:34 +05:30
parent 65f83cbae7
commit 69aa8ffac4

View File

@ -17,8 +17,8 @@ class Employee(Document):
self.salary_structure_exists = frappe.db.get_value("Salary Structure",
{"employee": self.name, "is_active": "Yes", "docstatus": ["!=", 2]})
def as_dict(self):
doc = super(Employee, self).as_dict()
def as_dict(self, no_nulls=False):
doc = super(Employee, self).as_dict(no_nulls)
if hasattr(self, "salary_structure_exists"):
doc["salary_structure_exists"] = self.salary_structure_exists