Changes between Version 1 and Version 2 of Ticket #33950
- Timestamp:
- Aug 23, 2022, 5:10:27 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33950 – Description
v1 v2 41 41 def get_context_data(self, **kwargs): 42 42 context = super().get_context_data(**kwargs) 43 if "visit_form " not in context:43 if "visit_forms" not in context: 44 44 context["visit_forms"] = [ 45 45 VisitForm(instance=visit) … … 55 55 So is in the view: {{{self.object.visits.all()._prefetch_related_lookups}}} is null as well. 56 56 57 Then the queries are made twice, erasing the {{{prefetch_related()}}} effect. 58 57 59 Many thanks!