Fix: edition user avec cas_id numérique

This commit is contained in:
Emmanuel Viennet 2024-12-19 13:47:54 +01:00
parent bb99cd8aa6
commit bc39997c06
3 changed files with 7 additions and 2 deletions

View File

@ -264,7 +264,11 @@ class TF(object):
self.values[field] = "" self.values[field] = ""
# convert numbers, except ids # convert numbers, except ids
if field.endswith("id") and self.values[field]: if (
field.endswith("id")
and not descr.get("no_convert")
and self.values[field]
):
# enforce integer ids: # enforce integer ids:
try: try:
self.values[field] = int(self.values[field]) self.values[field] = int(self.values[field])

View File

@ -415,6 +415,7 @@ def create_user_form(user_name=None, edit=0, all_roles=True):
{ {
"title": "Identifiant CAS", "title": "Identifiant CAS",
"input_type": "text", "input_type": "text",
"no_convert": True, # empeche conversion en int de l'id
"explanation": "id du compte utilisateur sur le CAS de l'établissement " "explanation": "id du compte utilisateur sur le CAS de l'établissement "
+ ( + (
"<b>pa défaut identique à l'identifiant ScoDoc</b> " "<b>pa défaut identique à l'identifiant ScoDoc</b> "

View File

@ -3,7 +3,7 @@
"Infos sur version ScoDoc" "Infos sur version ScoDoc"
SCOVERSION = "9.7.48" SCOVERSION = "9.7.49"
SCONAME = "ScoDoc" SCONAME = "ScoDoc"