From 25c9837ec26b4d3b210fd9852c82f6c85d94f0fa Mon Sep 17 00:00:00 2001 From: Eric Fayolle Date: Tue, 19 Mar 2024 16:35:40 +0100 Subject: [PATCH] =?utf8?q?Premi=C3=A8re=20gestion=20eid=20pour=20les=20eve?= =?utf8?q?nts?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Web/mdm3.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Web/mdm3.py b/Web/mdm3.py index bf9f8ede..72714750 100755 --- a/Web/mdm3.py +++ b/Web/mdm3.py @@ -204,9 +204,10 @@ def removeNode(): # Parse the JSON into a Python dictionary req = request.get_json() # Print the dictionary - if debug : print("Flask/removeNode ",req);print("/removeNode ",req['id']); + if debug : print("Flask/removeNode ",req);print("/removeNode ",req['eId'],req['id']); + eId = req['eId']; id = req['id']; - (eficasEditor, codeErreur, message) = eficasAppli.getWebEditorById(session['canalId'],session['externEditorId']) + (eficasEditor, codeErreur, message) = eficasAppli.getWebEditorById(session['canalId'],eId) if codeErreur : print ('il faut faire qqchose') ret,message = eficasEditor.removeNode(session['canalId'],session['externEditorId'],id); @@ -229,13 +230,13 @@ def appendChild(): req = request.get_json() # Print the dictionary if debug : print(__file__+"Flask/appendChild : ",req); - id=req['id'];name=req['name'];pos=req['pos']; + eId = req['eId'];id=req['id'];name=req['name'];pos=req['pos']; # id, value = req.values() # Dangereux correspondance implicite #rId,message,changeDone = eficasEditor.appendChild(id,name,pos); (eficasEditor, codeErreur, message) = eficasAppli.getWebEditorById(session['canalId'],session['externEditorId']) if codeErreur : print ('il faut faire qqchose') - (newId, codeErreur, message) = eficasEditor.appendChild(session['canalId'],session['externEditorId'],id,name,pos); + (newId, codeErreur, message) = eficasEditor.appendChild(session['canalId'],eId,id,name,pos); if debug : print (__file__+"Flask/appendChild : newId : ",newId); return make_response(json.dumps( {'id':newId} )) #TODO: Code Erreur @@ -291,7 +292,7 @@ def newDataset(): fancyTreeDict=eficasEditor.getDicoForFancy(eficasEditor.tree.racine) #TODO: changer le nom Dico en Dict #fancyTreeJS=json.dumps([fancyTreeDict],indent=4) #TODO : remove indent if not DEBUG - + fancyTreeDict['eId']=editorId; #print("---- myFancyTreeDico ----") pprint(fancyTreeDict) #print("---- myFancyTreeJS ----") -- 2.39.2