Пример #1
0
 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())
Пример #2
0
 def save_to_db(self):
     # to save data to the manager's database
     Database.insert(departmentConstant.COLLECTION, self.json())
Пример #3
0
 def save_to_db(self):
     # to save data to the employee's database
     Database.insert(employeeConstants.COLLECTION, self.json())