A task's kind is correctable — the Kind select stops lying (#3129) #133
@@ -32,8 +32,11 @@ async def owner_id():
|
||||
|
||||
async def _write(uid: int, kind: str) -> int:
|
||||
async with async_session() as s:
|
||||
# No is_task=: it is a derived read-only property (a note IS a task
|
||||
# when status is not None), so passing it raises rather than being
|
||||
# ignored. status="todo" is what makes this a task.
|
||||
note = Note(
|
||||
user_id=uid, title=f"kind {kind}", body="", is_task=True,
|
||||
user_id=uid, title=f"kind {kind}", body="",
|
||||
status="todo", task_kind=kind,
|
||||
)
|
||||
s.add(note)
|
||||
|
||||
Reference in New Issue
Block a user