Browse Source

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

Romain Rigaux 8 năm trước cách đây
mục cha
commit
8cf9b92
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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]