File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed
notifications/templates/design Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 11<!-- Main -->
22{% load humanize %}
3+ {% load custom_tags %}
34
45{% if records|length %}
56 {% for op in records %}
Original file line number Diff line number Diff line change @@ -198,6 +198,23 @@ class OpsLearningAdmin(GotoNextModelAdmin):
198198 actions = ["export_selected_records" ]
199199 _original_is_validated = False
200200
201+ def get_queryset (self , request ):
202+ return (
203+ super ()
204+ .get_queryset (request )
205+ .select_related (
206+ "appeal_code" ,
207+ )
208+ .prefetch_related (
209+ "sector" ,
210+ "sector_validated" ,
211+ "organization" ,
212+ "organization_validated" ,
213+ "per_component" ,
214+ "per_component_validated" ,
215+ )
216+ )
217+
201218 def get_fields (self , request , obj = None ):
202219 if obj and obj .is_validated :
203220 return (
Original file line number Diff line number Diff line change @@ -792,10 +792,10 @@ def get_queryset(self):
792792 "appeal_code" ,
793793 ).prefetch_related (
794794 "sector" ,
795- "organization" ,
796- "per_component" ,
797795 "sector_validated" ,
796+ "organization" ,
798797 "organization_validated" ,
798+ "per_component" ,
799799 "per_component_validated" ,
800800 "appeal_code__event__countries_for_preview" ,
801801 )
@@ -806,10 +806,10 @@ def get_queryset(self):
806806 )
807807 .prefetch_related (
808808 "sector" ,
809- "organization" ,
810- "per_component" ,
811809 "sector_validated" ,
810+ "organization" ,
812811 "organization_validated" ,
812+ "per_component" ,
813813 "per_component_validated" ,
814814 "appeal_code__event__countries_for_preview" ,
815815 )
You can’t perform that action at this time.
0 commit comments