Rules that can go stale say so — verify_with, expires_when, the sweep, and task_kind='spike' (milestone 312, steps 1–5) #132
@@ -32,8 +32,11 @@ async def owner_id():
|
|||||||
|
|
||||||
async def _write(uid: int, kind: str) -> int:
|
async def _write(uid: int, kind: str) -> int:
|
||||||
async with async_session() as s:
|
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(
|
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,
|
status="todo", task_kind=kind,
|
||||||
)
|
)
|
||||||
s.add(note)
|
s.add(note)
|
||||||
|
|||||||
Reference in New Issue
Block a user