1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

fix server error with absent client_secret

This commit is contained in:
AlanCoding 2018-02-27 09:23:36 -05:00
parent c3968ca2b6
commit c900027f82
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -998,7 +998,7 @@ class OAuth2ApplicationSerializer(BaseSerializer):
def to_representation(self, obj): def to_representation(self, obj):
ret = super(OAuth2ApplicationSerializer, self).to_representation(obj) ret = super(OAuth2ApplicationSerializer, self).to_representation(obj)
if obj.client_type == 'public': if obj.client_type == 'public':
ret.pop('client_secret') ret.pop('client_secret', None)
return ret return ret