Commits

Ionel Cristian Mărieș committed c22f767

Added support for extra_fields.

  • Participants
  • Parent commits 99afb3c

Comments (0)

Files changed (1)

piston/emitters.py

                     if not get_fields:
                         get_fields = set([ f.attname.replace("_id", "", 1)
                             for f in data._meta.fields + data._meta.virtual_fields])
+                    
+                    if hasattr(mapped, 'extra_fields'):
+                        get_fields.update(mapped.extra_fields)
 
                     # sets can be negated.
                     for exclude in exclude_fields: