fix: Tags keep the order they were entered in (v2.6.4)
add_tags_to_note() rewrites note_tags in entry order on every save, so note_tags.id already records it; get_note_tags(entered_order=True) reads it back. Crossposts (Threads topic, which hashtags fit on Bluesky), the editor and Micropub q=source/update use it, so saving no longer reorders tags alphabetically. Public pages stay alphabetical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2474628646
commit
4b56f7cd4b
8 files changed
+118
-15
No files matched your search
@@ -226,8 +226,8 @@ def edit_note_form(note_id: int):
|
||||
flash("Note not found", "error")
|
||||
return redirect(url_for("admin.dashboard")), 404
|
||||
|
||||
# Pre-load tags for the edit form (v1.3.0 Phase 3)
|
||||
tags = get_note_tags(note.id)
|
||||
# Pre-load tags for the edit form (v1.3.0 Phase 3), as entered so saving keeps the order
|
||||
tags = get_note_tags(note.id, entered_order=True)
|
||||
object.__setattr__(note, '_cached_tags', tags)
|
||||
|
||||
from starpunk.syndication import get_note_syndications, get_targets
|
||||
|
||||
Reference in new issue
Block a user