@@ -34,27 +34,27 @@ def run_subflow(self, user_apikey, workflow, argument, source_workflow="", sourc
3434 url = "%s/api/v1/workflows/%s/execute" % (self .url , workflow )
3535
3636 params = {}
37- if len (source_workflow ) > 0 :
37+ if len (str ( source_workflow ) ) > 0 :
3838 params ["source_workflow" ] = source_workflow
3939 else :
4040 print ("No source workflow" )
4141
42- if len (source_auth ) > 0 :
42+ if len (str ( source_auth ) ) > 0 :
4343 params ["source_auth" ] = source_auth
4444 else :
4545 print ("No source auth" )
4646
47- if len (source_node ) > 0 :
47+ if len (str ( source_node ) ) > 0 :
4848 params ["source_node" ] = source_node
4949 else :
5050 print ("No source node" )
5151
52- if len (source_execution ) > 0 :
52+ if len (str ( source_execution ) ) > 0 :
5353 params ["source_execution" ] = source_execution
5454 else :
5555 print ("No source execution" )
5656
57- if len (startnode ) > 0 :
57+ if len (str ( startnode ) ) > 0 :
5858 params ["start" ] = startnode
5959 else :
6060 print ("No startnode" )
@@ -63,7 +63,7 @@ def run_subflow(self, user_apikey, workflow, argument, source_workflow="", sourc
6363 "Authorization" : "Bearer %s" % user_apikey ,
6464 }
6565
66- if len (argument ) == 0 :
66+ if len (str ( argument ) ) == 0 :
6767 ret = requests .post (url , headers = headers , params = params )
6868 else :
6969 if not isinstance (argument , list ) and not isinstance (argument , object ) and not isinstance (argument , dict ):
@@ -74,7 +74,7 @@ def run_subflow(self, user_apikey, workflow, argument, source_workflow="", sourc
7474
7575 try :
7676 ret = requests .post (url , headers = headers , params = params , json = argument )
77- print (f"Successfully sent argument of length { len (argument )} as JSON" )
77+ print (f"Successfully sent argument of length { len (str ( argument ) )} as JSON" )
7878 except :
7979 try :
8080 ret = requests .post (url , headers = headers , json = argument , params = params )
0 commit comments