#4553: newsforms.models.save_instance doesn't save references to related
correctly
-----------------------------------------+----------------------------------
Reporter: shaunc <[EMAIL PROTECTED]> | Owner: adrian
Status: new | Component: django.newforms
Version: SVN | Keywords:
Stage: Unreviewed | Has_patch: 1
-----------------------------------------+----------------------------------
The current line 36:
setattr(instance, f.name, cleaned_data[f.name])
will save integer primary key to field for relation *object* not the
underlying field for the id
Works if replaced with:
attname = opts.get_field( f.name ).get_attname()
setattr(instance, attname, cleaned_data[f.name] )
--
Ticket URL: <http://code.djangoproject.com/ticket/4553>
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
-~----------~----~----~----~------~----~------~--~---