diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-07-13 13:33:42 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-07-13 13:48:07 +0200 |
commit | 15bc2c460ac0cb2647e429e0dc78139fa43a526d (patch) | |
tree | 201c80a1b58608e65e0375a1f5abe66bfc7815cb | |
parent | 41449899f5b881c081f3e30a5ba82272479183fc (diff) | |
download | Ishtar-15bc2c460ac0cb2647e429e0dc78139fa43a526d.tar.bz2 Ishtar-15bc2c460ac0cb2647e429e0dc78139fa43a526d.zip |
🐛 Account form: fix slugify of default username
-rw-r--r-- | changelog/en/changelog_2022-06-15.md | 3 | ||||
-rw-r--r-- | changelog/fr/changelog_2023-01-25.md | 1 | ||||
-rw-r--r-- | ishtar_common/forms_common.py | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/changelog/en/changelog_2022-06-15.md b/changelog/en/changelog_2022-06-15.md index d0314cc17..4dbcc1f4a 100644 --- a/changelog/en/changelog_2022-06-15.md +++ b/changelog/en/changelog_2022-06-15.md @@ -10,7 +10,8 @@ v4.0.54 - 2099-12-31 - button to show password on admin change password form ### Bug fixes ### -- fix find redirection after geo item creation/modification +- fix find redirection after geo item creation/modification +- account form: fix slugify of default username v4.0.53 - 2023-07-06 -------------------- diff --git a/changelog/fr/changelog_2023-01-25.md b/changelog/fr/changelog_2023-01-25.md index 0e32f8613..0d4056a11 100644 --- a/changelog/fr/changelog_2023-01-25.md +++ b/changelog/fr/changelog_2023-01-25.md @@ -11,6 +11,7 @@ v4.0.54 - 2099-12-31 ### Corrections de dysfonctionnements ### - correction de redirection sur le mobilier après ajout/édition d'élement géographique +- formulaire de compte : correction de la normalisation du nom d'utilisateur v4.0.53 - 2023-07-06 -------------------- diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index 01c03ec45..fa0cff575 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -1265,7 +1265,7 @@ class AccountForm(IshtarForm): values = person.raw_name.lower().split(" ") if profile.account_naming_style == "FN" and len(values) > 1: values = values[1:] + [values[0]] - self.fields["username"].initial = ".".join(values) + self.fields["username"].initial = ".".join([slugify(v) for v in values]) def clean(self): cleaned_data = self.cleaned_data |