#33004: Inconsistent / Unexpected handling of assigning unsaved model to Generic
Foreign Key
-------------------------------------+-------------------------------------
     Reporter:  Finn Andersen        |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  fk, gfk, generic     |             Triage Stage:  Accepted
  foreign key, validation            |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

 * cc: Tim Graham (added)
 * stage:  Unreviewed => Accepted


Comment:

 Agreed, assigning unsaved objects should raise an error for
 `GenericForeignKey`. It was added in
 5643a3b51be338196d0b292d5626ad43648448d3 but reverted later in
 5980b05c1fad69eef907e0076aa2dc837edab529. It looks like an unintended
 change as [https://docs.djangoproject.com/en/stable/releases/1.8
 /#assigning-unsaved-objects-to-relations-raises-an-error release notes]
 still claim that an error is raised in this case.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33004#comment:1>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.6e33a3b775767dd8a0ef064380a597be%40djangoproject.com.

Reply via email to