- return {'day': Day.by_date(self.conn, date, create=True),
+ return {'day': Day.by_id(self.conn, date, create=True),
'todos': Todo.by_date(self.conn, date),
'processes': Process.all(self.conn),
'conditions_listing': conditions_listing}
'todos': Todo.by_date(self.conn, date),
'processes': Process.all(self.conn),
'conditions_listing': conditions_listing}
id_ = self.params.get_int_or_none('id')
todo = Todo.by_id(self.conn, id_)
return {'todo': todo,
id_ = self.params.get_int_or_none('id')
todo = Todo.by_id(self.conn, id_)
return {'todo': todo,
'condition_candidates': Condition.all(self.conn)}
def do_GET_conditions(self) -> dict[str, object]:
'condition_candidates': Condition.all(self.conn)}
def do_GET_conditions(self) -> dict[str, object]:
def do_POST_day(self) -> None:
"""Update or insert Day of date and Todos mapped to it."""
date = self.params.get_str('date')
def do_POST_day(self) -> None:
"""Update or insert Day of date and Todos mapped to it."""
date = self.params.get_str('date')
day.comment = self.form_data.get_str('comment')
day.save(self.conn)
process_id = self.form_data.get_int_or_none('new_todo')
if process_id is not None:
process = Process.by_id(self.conn, process_id)
day.comment = self.form_data.get_str('comment')
day.save(self.conn)
process_id = self.form_data.get_int_or_none('new_todo')
if process_id is not None:
process = Process.by_id(self.conn, process_id)
- todo = Todo(None, process, False, day)
+ todo = Todo(None, process, False, day.date)
self.form_data.get_all_int('condition'))
process.set_fulfills(self.conn, self.form_data.get_all_int('fulfills'))
process.set_undoes(self.conn, self.form_data.get_all_int('undoes'))
self.form_data.get_all_int('condition'))
process.set_fulfills(self.conn, self.form_data.get_all_int('fulfills'))
process.set_undoes(self.conn, self.form_data.get_all_int('undoes'))
assert process.id_ is not None # for mypy
process.explicit_steps = []
steps: list[tuple[int | None, int, int | None]] = []
assert process.id_ is not None # for mypy
process.explicit_steps = []
steps: list[tuple[int | None, int, int | None]] = []