def save_to_db(self): if self.employee_id is not None: Database.insert(billConstant.COLLECTION, self.employee_json()) else: Database.insert(billConstant.COLLECTION, self.manager_json())
def save_to_db(self): # to save data to the manager's database Database.insert(departmentConstant.COLLECTION, self.json())
def save_to_db(self): # to save data to the employee's database Database.insert(employeeConstants.COLLECTION, self.json())