WIP: Aureplop/kpsul js refactor #501
1 changed files with 3 additions and 5 deletions
|
@ -1472,15 +1472,13 @@ def history_json(request):
|
||||||
|
|
||||||
# Construction de la requête (sur les opérations) pour le prefetch
|
# Construction de la requête (sur les opérations) pour le prefetch
|
||||||
ope_queryset_prefetch = Operation.objects.select_related(
|
ope_queryset_prefetch = Operation.objects.select_related(
|
||||||
'canceled_by__trigramme', 'addcost_for__trigramme',
|
'canceled_by', 'addcost_for',
|
||||||
'article__name')
|
'article')
|
||||||
ope_prefetch = Prefetch('opes',
|
ope_prefetch = Prefetch('opes',
|
||||||
queryset=ope_queryset_prefetch)
|
queryset=ope_queryset_prefetch)
|
||||||
|
|
||||||
transfer_queryset_prefetch = Transfer.objects.select_related(
|
transfer_queryset_prefetch = Transfer.objects.select_related(
|
||||||
'from_acc__trigramme', 'to_acc__trigramme',
|
'from_acc', 'to_acc', 'canceled_by')
|
||||||
'from_acc__id', 'to_acc__id',
|
|
||||||
'canceled_by__trigramme')
|
|
||||||
|
|
||||||
if accounts:
|
if accounts:
|
||||||
transfer_queryset_prefetch = transfer_queryset_prefetch.filter(
|
transfer_queryset_prefetch = transfer_queryset_prefetch.filter(
|
||||||
|
|
Loading…
Reference in a new issue