Skip to content
Snippets Groups Projects
Commit 25b43f93 authored by Shirlei Chaves's avatar Shirlei Chaves
Browse files

Show aliased fields for one voter if using alias

parent 2b4c0b35
Branches
Tags
No related merge requests found
......@@ -186,7 +186,14 @@ class LDObject(object):
def toDict(self, alternate_fields=None, complete=False):
val = {}
for f in (alternate_fields or self.FIELDS):
fields = alternate_fields or self.FIELDS
if not self.structured_fields:
if self.wrapped_obj.alias != None:
fields = self.ALIASED_VOTER_FIELDS
for f in (alternate_fields or fields):
# is it a structured subfield?
if self.structured_fields.has_key(f):
val[f] = recursiveToDict(self.structured_fields[f])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment