From cffb2f324f82907ae082a2012e5d9a048b0c76b1 Mon Sep 17 00:00:00 2001 From: Chris Church Date: Fri, 1 May 2015 13:39:54 -0400 Subject: [PATCH] Only update name if already present in result, so it won't show up for cancel/relaunch. --- awx/api/serializers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index ba6f4d8acc..65b573de11 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -1590,7 +1590,8 @@ class AdHocCommandSerializer(UnifiedJobSerializer): ret['credential'] = None # For the UI, only module_name is returned for name, instead of the # longer module name + module_args format. - ret['name'] = obj.module_name + if 'name' in ret: + ret['name'] = obj.module_name return ret