chore: Update employee for tests

This commit is contained in:
Deepesh Garg 2023-09-06 13:19:00 +05:30
parent 174f95d699
commit ae01d70b33

View File

@ -66,5 +66,8 @@ def make_employee(user, company=None, **kwargs):
employee.insert()
return employee.name
else:
frappe.db.set_value("Employee", {"employee_name": user}, "status", "Active")
return frappe.get_value("Employee", {"employee_name": user}, "name")
employee = frappe.get_doc("Employee", {"employee_name": user})
employee.update(kwargs)
employee.status = "Active"
employee.save()
return employee.name