Explorar o código

HUE-6433 [jb] Avoid js error when Pig script does not have any child job

Romain Rigaux %!s(int64=8) %!d(string=hai) anos
pai
achega
8cf9b928fb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      apps/jobbrowser/src/jobbrowser/apis/workflow_api.py

+ 1 - 1
apps/jobbrowser/src/jobbrowser/apis/workflow_api.py

@@ -167,7 +167,7 @@ class WorkflowActionApi(Api):
     properties.pop('toString')
     common['properties']['conf'] = properties.pop('conf')
     common['properties']['externalId'] = properties.get('externalId', '')
-    common['properties']['externalChildIDs'] = properties.pop('externalChildIDs').split(',')
+    common['properties']['externalChildIDs'] = properties.get('externalChildIDs') and properties.pop('externalChildIDs').split(',')
     common['properties']['properties'] = [{'name': key, 'value': val} for key, val in properties.iteritems()]
 
     common['properties']['workflow_id'] = appid.split('@', 1)[0]