Matthew Schinckel  committed 0bdddd2

Fixes a bug where the id/pk of a newly created object was not returned.

  • Participants
  • Parent commits fe3e7dd
  • Branches default

Comments (0)

Files changed (1)

File repose/serializers/

     if isinstance(form, forms.BaseForm):        
         result = {}
         for name in form.fields.keys():
+            # Need to special-case this, as it wasn't always being returned.
+            if name in ['id','pk'] and hasattr(form, 'instance'):
+                result[name] =
+                continue
             if name in form.hidden_fields():
             if name in