summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.md3
-rw-r--r--ishtar_common/forms_common.py6
-rw-r--r--ishtar_common/version.py4
3 files changed, 7 insertions, 6 deletions
diff --git a/CHANGES.md b/CHANGES.md
index dfe8cd185..113abb013 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -6,12 +6,13 @@ date: 2022-05-17
Ishtar changelog
================
-v3.1.64->67 - 2022-05-18
+v3.1.64->68 - 2022-05-18
------------------------
### Bug fix ###
- Person: fix raw_name reinit when no name is given
+- Account: fix username check on simple user (not only ishtaruser)
- Operation: fix label "in charge" -> "scientific monitor"
v3.1.63 - 2022-05-17
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py
index 65d892fc9..b689b7baf 100644
--- a/ishtar_common/forms_common.py
+++ b/ishtar_common/forms_common.py
@@ -1065,11 +1065,11 @@ class AccountForm(IshtarForm):
_("You must provide a correct " "password.")
)
# check username unicity
- q = models.IshtarUser.objects.filter(
- user_ptr__username=cleaned_data.get("username")
+ q = User.objects.filter(
+ username=cleaned_data.get("username")
)
if cleaned_data.get("pk"):
- q = q.exclude(person__pk=cleaned_data.get("pk"))
+ q = q.exclude(ishtaruser__person__pk=cleaned_data.get("pk"))
if q.count():
raise forms.ValidationError(_("This username already exists."))
return cleaned_data
diff --git a/ishtar_common/version.py b/ishtar_common/version.py
index 5f8a164ca..f70fb2aff 100644
--- a/ishtar_common/version.py
+++ b/ishtar_common/version.py
@@ -1,5 +1,5 @@
-# 3.1.67
-VERSION = (3, 1, 67)
+# 3.1.68
+VERSION = (3, 1, 68)
def get_version():