Skip to content
Snippets Groups Projects
Commit 60dfa3ee authored by Ben Adida's avatar Ben Adida
Browse files

Merge pull request #70 from shirlei/45cc09a

Show aliased fields for one voter if using alias 
parents 38023f49 81fa4878
No related branches found
No related tags found
No related merge requests found
...@@ -186,7 +186,14 @@ class LDObject(object): ...@@ -186,7 +186,14 @@ class LDObject(object):
def toDict(self, alternate_fields=None, complete=False): def toDict(self, alternate_fields=None, complete=False):
val = {} val = {}
for f in (alternate_fields or self.FIELDS):
fields = 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? # is it a structured subfield?
if self.structured_fields.has_key(f): if self.structured_fields.has_key(f):
val[f] = recursiveToDict(self.structured_fields[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