Your details: saving the page untouched stores an empty telephone row where the chooser has a default country #649
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#649
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 while reviewing #304; it reproduces identically on
be9b6febc, before that change.What happens
Open Your details in a language whose locale gives the telephone chooser a default country
(English, French, Portuguese: most of them) and press Save without touching anything.
A telephone row with an empty number is created. If the account had no number, the empty
row becomes the primary one.
In a language where the chooser starts empty (Ukrainian, for one) it does not happen.
Why
The blank extra row of the formset posts
["GB", ""]: the country the chooser started atand no number. Its initial value is
None.MultiValueField.has_changedcompares the twopart by part against
decompress(None), finds the country different, and calls the rowchanged; the formset then saves it, and
PhoneNumber(number="")is stored.What should happen
A row nobody typed a number into is not a change.
PhoneField.has_changedshould treat aninitial of
Noneasdecompress(""), so a chooser that merely shows its default is notsomething the person did.
Acceptance
removed there. Say so in the changelog line.