On 12 June 2012 04:44, Jerome Baum <jer...@jeromebaum.com> wrote: > Drop the "defaults" kwarg to get_or_create as apparently you're not using > it. Also drop the conditional on those set/save statements.
Ah, I should have made clear that some of the fields in defaults are NOT NULL, so it's necessary to pass them in defaults. That's the problem, really. I did start off by just doing get_or_create, set fields, save, with no conditional, but then some of the fields I needed to set started becoming NOT NULL. I guess I'm probably going to have to create a custom manager or utility function. It's annoying since I use some other custom managers already, but oh well. Thanks for all your suggestions. - ojno -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.