Fix problem with to_dict

This commit is contained in:
Jason Paryani
2013-09-04 11:20:05 -07:00
parent 3e4311fe12
commit effacb872f
4 changed files with 26 additions and 70 deletions

View File

@@ -438,7 +438,8 @@ cdef _to_dict(msg):
pass
for field in msg.schema.non_union_fields:
ret[field] = _to_dict(getattr(msg, field))
if msg._has(field):
ret[field] = _to_dict(getattr(msg, field))
return ret