From 9b84670cf09cb51742af1b4b4d6e35f4fda54550 Mon Sep 17 00:00:00 2001 From: adamscmRH Date: Wed, 16 Aug 2017 11:32:16 -0400 Subject: [PATCH] Removes auth field from Access List serializer --- awx/api/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index f36688ce46..fca1fa38d3 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -779,10 +779,10 @@ class UserSerializer(BaseSerializer): 'username', 'first_name', 'last_name', 'email', 'is_superuser', 'is_system_auditor', 'password', 'ldap_dn', 'external_account') - def to_representation(self, obj): + def to_representation(self, obj): # TODO: Remove in 3.3 ret = super(UserSerializer, self).to_representation(obj) ret.pop('password', None) - if obj: + if obj and type(self) is UserSerializer or self.version == 1: ret['auth'] = obj.social_auth.values('provider', 'uid') return ret