mirror of
https://github.com/ansible/awx.git
synced 2026-02-17 11:10:03 -03:30
Merge pull request #1368 from AlanCoding/none_client
Fix server error with absent client_secret
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user