From c900027f82226fa3c3e8706971bf44a13da2b84f Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Tue, 27 Feb 2018 09:23:36 -0500 Subject: [PATCH] fix server error with absent client_secret --- awx/api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 2f03739f18..054d0573dd 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -998,7 +998,7 @@ class OAuth2ApplicationSerializer(BaseSerializer): def to_representation(self, obj): ret = super(OAuth2ApplicationSerializer, self).to_representation(obj) if obj.client_type == 'public': - ret.pop('client_secret') + ret.pop('client_secret', None) return ret