Commits

Jesper Nøhr committed f34e64f

when explicitly specifying fields in fields=, don't exclude them

  • Participants
  • Parent commits 85c4fa4

Comments (0)

Files changed (1)

piston/emitters.py

                     """
                     mapped = self.in_typemapper(type(data), self.anonymous)
                     get_fields = set(mapped.fields)
-                    exclude_fields = set(mapped.exclude)
+                    exclude_fields = set(mapped.exclude).difference(get_fields)
                 
                     if not get_fields:
                         get_fields = set([ f.attname.replace("_id", "", 1)