Hi Michael,

On Mon, 2006-06-12 at 14:33 +0200, Michael Radziej wrote:
> Hi,
> 
> I wonder if there's a bug in the case that save() creates a new record for a 
> model without data.
[...]

> The pk value isn't retrieved. There should be a:
> 
>                 setattr(self, self._meta.pk.attname, 
> backend.get_last_insert_id(cursor, self._meta.db_table, self._meta.pk.column))
> 
> Or, probaby better, move the settattr from the other case around:

Well spotted! You are right, it's a bug and the tests I checked in when
I made this change didn't test for this. It is fixed (with a test
addition) in revision 3118.

Thanks for checking this out.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to