Remove unnecessary prefetches.
This commit is contained in:
parent
84f3554d98
commit
bb16c152c4
|
@ -88,12 +88,8 @@ class RaidDetailView(SingleObjectMixin, MultiModelFormView):
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
return Raid.objects.prefetch_related(
|
return Raid.objects.prefetch_related(
|
||||||
"responses",
|
|
||||||
"responses__character",
|
|
||||||
"responses__character__user",
|
|
||||||
"responses__character__user__rank",
|
"responses__character__user__rank",
|
||||||
"responses__character__user__main",
|
"responses__character__user__main",
|
||||||
"comments",
|
|
||||||
"comments__user__main"
|
"comments__user__main"
|
||||||
).all()
|
).all()
|
||||||
|
|
||||||
|
@ -161,7 +157,7 @@ class RaidChangeView(PermissionRequiredMixin, SingleObjectMixin, MultiModelFormV
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
return Raid.objects.prefetch_related("responses", "responses__character").all()
|
return Raid.objects.all()
|
||||||
|
|
||||||
def get_raid_form_instance(self):
|
def get_raid_form_instance(self):
|
||||||
return self.object
|
return self.object
|
||||||
|
|
Loading…
Reference in a new issue