Saved views: a name in Greek, Cyrillic, Armenian, Georgian, Arabic or Ge'ez script is refused or overwrites another #504
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#504
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, reading how a saved view gets its slug and running it with the snapshot's interpreter.Related to #259.
Checked again on 2026-10-01 against
mainat0a5cad587: still present.A saved view's slug comes from
slugify(name), which withoutallow_unicode=Truekeeps only ASCII letters and digits. A name written in a non-Latin script gives an empty slug, and the view is refused with "A view needs a name." although one was typed. Postulo ships catalogues for el, bg, mk, sr, uk, ka, hy, am, ar and ti, whose speakers cannot name a view in their own script.core/tables.py:389-392,Table.save_view(slug = slugify(name)[:60], thenif not name or not slug: return dict(current or {}));core/tables.py:214-217,View.from_stored, which falls back to the sameslugify;core/views_tables.py:69-70,table_views, which reads "nothing changed" as "no name".save_viewreturns the settings unchanged and the page says the view needs a name. Checked:CompaniesTable.save_view({}, "Αιτήσεις σε αναμονή", "q=x", [])returns{};slugifygives""for Заявки, ዝርዝር and طلبات.2026. Views are matched by slug, so saving the second silently replaces the first.slugify(name, allow_unicode=True)in bothsave_viewandView.from_stored.QueryDict.urlencodealready percent-encodes a Unicodesaved=value, andapplied_viewcompares slugs as strings. A name made only of punctuation or emoji still gives an empty slug, so either refuse that with a message that says so, or use an opaque slug (a short hash of the cleaned name) that does not depend on the script.Done when
tests/test_saved_views.pyhas tests that a Greek and a Cyrillic name each save a view that_views_ofreturns andview_urlreaches, and that Заявки 2026 and Отказы 2026 are kept as two views.