def update(_id, bill_type, employee_id, manager_id, department_id, date_of_submission, bill_image_url, status): response = {} response['bill_type'] = bill_type if employee_id is None: response['manager_id'] = manager_id else: response['employee_id'] = employee_id response['department_id'] = department_id response['date_of_submission'] = date_of_submission response['bill_image_url'] = bill_image_url response['status'] = status Database.update(billConstant.COLLECTION, {'_id': _id}, response)
def update_to_db(self): # update bill-type details Database.update(billTypeConstant.COLLECTION, {'_id': self._id}, self.json())
def manager_update_to_db(self): print(self.manager_json()) Database.update(billConstant.COLLECTION, {'_id': self._id}, self.manager_json())
def employee_update_to_db(self): Database.update(billConstant.COLLECTION, {'_id': self._id}, self.employee_json())
def update_to_db(self): # to update particular employee details Database.update(employeeConstants.COLLECTION, {'_id':self._id}, self.json())
def update_to_db(self): # to update particular manager details Database.update(managerConstants.COLLECTION, {'_id': self._id}, self.json())