def function_alter_task(self, uuid_: uuid.UUID, item: Task): try: update_data = item.dict(exclude_unset=True) self.tasks[uuid_] = self.tasks[uuid_].copy(update=update_data) except KeyError as exception: raise HTTPException( status_code=404, detail='Task not found', ) from exception
def alterTask(self, uuid_: uuid.UUID, item: Task): update_data = item.dict(exclude_unset=True) self.tasks[uuid_] = self.tasks[uuid_].copy(update=update_data)