diff --git a/src/thoughtsync/notes/tags.py b/src/thoughtsync/notes/tags.py index 56bc94c..64004f1 100644 --- a/src/thoughtsync/notes/tags.py +++ b/src/thoughtsync/notes/tags.py @@ -128,13 +128,13 @@ async def _find_or_create_label(db, owner_id, name: str): return label.id -async def _lift_and_lift_and_reconcile_tags(db, note: Note) -> None: +async def _lift_and_reconcile_tags(db, note: Note) -> None: """Attach the note's tag labels, LIFT its standalone tags out of the body, and re-derive display_title if the body moved. - NAMED FOR THE MUTATION. It used to be `_lift_and_reconcile_tags` and only touched rows; - it now rewrites `note.body`, and a caller that does not expect that will compute - a display_title from text this function is about to delete. + NAMED FOR THE MUTATION. It used to be `_reconcile_tags` and only touched rows; it + now rewrites `note.body`, and a caller that does not expect that will compute a + display_title from text this function is about to delete. Which is why the lift and the re-derivation both live HERE rather than at the seven call sites that would each have to remember. Spreading a derived-value