Thanks Karen.

Actually, the behavior here is worst case, from my perspective, in
that Ture/False values will update an instance, but will not be saved
and no exception is thrown.  When I try to update the model with a
True/False value, it simply fails to update without giving any
indication of an error.

So, on my Slicehost installation (MySQL based):

m = Model.object.get(id=id)
print m.BooleanField             // Prints 0, if the value is False
m.BooleanField = True
m.save()
print m.BooleanField             // Prints True
m = Model.object.get(id=id)
print m.BooleanField             // Still prints 0.  The instance was
updated, but did not save.  No error.
m.BooleanField = 1
m.save()
print m.BooleanField             // Prints 1
m = Model.object.get(id=id)
print m.BooleanField             // Now prints 1.  Saved correctly.

I have to alter my code so 0 and 1 are submitted to get updates to
save correctly.  I am not pulling anything through SQL, only directly
through the Django models.  This sounds like a bug to me, but I want
to be sure there's not some MySQL boolean setting that I might be
missing in my settings.py, or even in my MySQL setup files.


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

Reply via email to