From d9cd7b0581848afc5ba958cf21a5c01e36eaf8a6 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Thu, 17 Dec 2020 19:34:27 +0300 Subject: [PATCH] Some fixes in ProcessorAliasDef --- Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py index a3fb53fd..e89dd803 100644 --- a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py +++ b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py @@ -349,15 +349,16 @@ def GSettingsKeyListValueOperatorPlus(inGSettings, inValue, inKeyList=None): # O return True # Create alias for def (can be used in ActivityItem in field Def) +# return Alias str def ProcessorAliasDefCreate(inGSettings, inDef, inAliasStr=None): lL = inGSettings["Logger"] if inAliasStr is None: inAliasStr = str(inDef) # Check if key is not exists - if inAliasStr not in inGSettings["ProcessorDict"]["AliasDefDict"]: - inGSettings["ProcessorDict"]["AliasDefDict"][inAliasStr]=inDef - else: - if lL: lL.warning(f"Orchestrator.ProcessorAliasDefCreate: Alias {inAliasStr} already exists in Alias dictionary.") - + if inAliasStr in inGSettings["ProcessorDict"]["AliasDefDict"]: + inAliasStr = str(inDef) + if lL: lL.warning(f"Orchestrator.ProcessorAliasDefCreate: Alias {inAliasStr} already exists in alias dictionary. Another alias will be generated and returned") + inGSettings["ProcessorDict"]["AliasDefDict"][inAliasStr] = inDef + return inAliasStr # Add Activity item in Processor list def ProcessorActivityItemAppend(inGSettings, inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None): if inArgList is None: inArgList=[]