#28375: QuerySet.prefetch_related() crashes with KeyError if model uses to_field and string primary key -------------------------------------+------------------------------------- Reporter: Maks Y | Owner: Paulo Type: Bug | Status: closed Component: Database layer | Version: 1.11 (models, ORM) | Severity: Normal | Resolution: fixed Keywords: prefetch_related | Triage Stage: Accepted string primary key. | Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Tim Graham <timograham@…>):
* status: assigned => closed * resolution: => fixed Comment: In [changeset:"fea9cb46aacc73cabac883a806ccb7fdc1f979dd" fea9cb4]: {{{ #!CommitTicketReference repository="" revision="fea9cb46aacc73cabac883a806ccb7fdc1f979dd" Fixed #28375 -- Fixed KeyError crash on reverse prefetch of a model with OneToOneField primary key to a non-pk field. }}} -- Ticket URL: <https://code.djangoproject.com/ticket/28375#comment:6> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.482d1b689107f26a97ce45aede9102e8%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.