#5450: save_m2m should raise an exception for unsaved models
-------------------------------------+-------------------------------------
               Reporter:  Øyvind     |          Owner:  ojii
  Saltvik <oyvind@…>                 |         Status:  new
                   Type:             |      Component:  Database layer
  Cleanup/optimization               |  (models, ORM)
              Milestone:             |       Severity:  Normal
                Version:  SVN        |       Keywords:
             Resolution:             |      Has patch:  0
           Triage Stage:  Accepted   |    Needs tests:  0
    Needs documentation:  0          |  Easy pickings:  0
Patch needs improvement:  0          |
                  UI/UX:  0          |
-------------------------------------+-------------------------------------

Comment (by ojii):

 An error is actually raised when trying to use save_m2m after a no-commit
 save:

 ValueError: 'Article' instance needs to have a primary key value before a
 many-to-many relationship can be used.

 That comes from line 492 in django.db.models.fields.related

-- 
Ticket URL: <https://code.djangoproject.com/ticket/5450#comment:8>
Django <https://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.

Reply via email to