Changes between Version 1 and Version 2 of Ticket #33950


Ignore:
Timestamp:
Aug 23, 2022, 5:10:27 AM (2 years ago)
Author:
Vincent Lefoulon
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33950 – Description

    v1 v2  
    4141    def get_context_data(self, **kwargs):
    4242        context = super().get_context_data(**kwargs)
    43         if "visit_form" not in context:
     43        if "visit_forms" not in context:
    4444            context["visit_forms"] = [
    4545                VisitForm(instance=visit)
     
    5555So is in the view: {{{self.object.visits.all()._prefetch_related_lookups}}} is null as well.
    5656
     57Then the queries are made twice, erasing the {{{prefetch_related()}}} effect.
     58
    5759Many thanks!
Back to Top