#36426: prefetch_related_objects() is doc'd to accept iterables but only accepts
sequences
-------------------------------------+-------------------------------------
     Reporter:  Jacob Walls          |                    Owner:  Luna
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Luna):

 Hello,

 I have just submitted a PR related to this ticket for review. Following
 the suggested approach, the patch modifies the implementation to accept
 any iterable by using `next(iter(...))` instead of indexing. This change
 aligns with the documentation and improves code robustness.

 Please let me know if there are any further improvements or feedback
 needed.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36426#comment:9>
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 visit 
https://groups.google.com/d/msgid/django-updates/010701985bcf7308-06e63a12-c637-4e96-9016-fa669890ec3f-000000%40eu-central-1.amazonses.com.

Reply via email to