From ec90b820baaac9dd50821aabfcf679863e971527 Mon Sep 17 00:00:00 2001 From: vapao Date: Thu, 26 Aug 2021 12:46:43 +0800 Subject: [PATCH] fix issue --- spug_api/apps/deploy/views.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/spug_api/apps/deploy/views.py b/spug_api/apps/deploy/views.py index e3d506d..9d1c9c6 100644 --- a/spug_api/apps/deploy/views.py +++ b/spug_api/apps/deploy/views.py @@ -141,12 +141,13 @@ class RequestDetailView(View): for item in data: counter += 1 item = json.loads(item.decode()) - if 'data' in item: - outputs[item['key']]['data'] += item['data'] - if 'step' in item: - outputs[item['key']]['step'] = item['step'] - if 'status' in item: - outputs[item['key']]['status'] = item['status'] + if item['key'] in outputs: + if 'data' in item: + outputs[item['key']]['data'] += item['data'] + if 'step' in item: + outputs[item['key']]['step'] = item['step'] + if 'status' in item: + outputs[item['key']]['status'] = item['status'] data = rds.lrange(key, counter, counter + 9) response['index'] = counter if req.is_quick_deploy: