-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Description
This is linked to #4917
| return relationship.all() if hasattr(relationship, 'all') else relationship |
Why can't we just allow some customization at this line? Usually with any toolbox, we provide a best effort default and give the user the option to customize. In this case, the relations will ALWAYS be fetched with .all(). I have a simple case where I need an annotation on each child and so a single query is enough, if done on the ManyRelatedField level. How about making the ManyRelatedField also accept a queryset argument and default to .all() if there is no queryset argument?
robd003
Metadata
Metadata
Assignees
Labels
No labels