#3765: Exception when adding a new record in the admin form with related
recordss
----------------------------------+-----------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Status: new | Component: Admin interface
Version: SVN | Resolution:
Keywords: | Stage: Unreviewed
Has_patch: 1 | Needs_docs: 0
Needs_tests: 1 | Needs_better_patch: 1
----------------------------------+-----------------------------------------
Comment (by [EMAIL PROTECTED]):
Same here: bug occurs in python2.5 and not in python2.4. Note that this is
a duplicate of #3684, but I'm not sure how to merge the two tickets.
A small stylistic note on the patch: I think {{{new_data_getted =
new_data.get(self.name, [self.get_default()])}}} could be changed into
{{{new_data_getted = new_data.get(self.name, self.get_default())}}} since
the fact that the default is not a list is already taken care of. Of
course I might be missing something here. Ah, and there's a superfluous
pair of parentheses around isinstance. I'll be so bold as to attach a
revised version of dswistowski's patch. The one serious potential issue
that I could think of, for which I don't know enough of django, would be
if the intended return value is ever a list.
--
Ticket URL: <http://code.djangoproject.com/ticket/3765#comment:5>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---