@@ -462,7 +462,14 @@ def dispatch_with_args(self, body, argMap):
462
462
state = body .get ('state' , [])
463
463
output = body ['output' ]
464
464
465
- target_id = '{}.{}' .format (output ['id' ], output ['property' ])
465
+ try :
466
+ output_id = output ['id' ]
467
+ output_property = output ['property' ]
468
+ target_id = "%s.%s" % (output_id , output_property )
469
+ except :
470
+ target_id = output
471
+ output_id , output_property = output .split ("." )
472
+
466
473
args = []
467
474
468
475
da = argMap .get ('dash_app' , None )
@@ -491,10 +498,10 @@ def dispatch_with_args(self, body, argMap):
491
498
return 'EDGECASEEXIT'
492
499
493
500
res = self .callback_map [target_id ]['callback' ](* args , ** argMap )
494
- if da and da .have_current_state_entry (output [ 'id' ], output [ 'property' ] ):
501
+ if da and da .have_current_state_entry (output_id , output_property ):
495
502
response = json .loads (res .data .decode ('utf-8' ))
496
- value = response .get ('response' , {}).get ('props' , {}).get (output [ 'property' ] , None )
497
- da .update_current_state (output [ 'id' ], output [ 'property' ] , value )
503
+ value = response .get ('response' , {}).get ('props' , {}).get (output_property , None )
504
+ da .update_current_state (output_id , output_property , value )
498
505
499
506
return res
500
507
0 commit comments