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
|
||||
ope_queryset_prefetch = Operation.objects.select_related(
|
||||
'canceled_by__trigramme', 'addcost_for__trigramme',
|
||||
'article__name')
|
||||
'canceled_by', 'addcost_for',
|
||||
'article')
|
||||
ope_prefetch = Prefetch('opes',
|
||||
queryset=ope_queryset_prefetch)
|
||||
|
||||
transfer_queryset_prefetch = Transfer.objects.select_related(
|
||||
'from_acc__trigramme', 'to_acc__trigramme',
|
||||
'from_acc__id', 'to_acc__id',
|
||||
'canceled_by__trigramme')
|
||||
'from_acc', 'to_acc', 'canceled_by')
|
||||
|
||||
if accounts:
|
||||
transfer_queryset_prefetch = transfer_queryset_prefetch.filter(
|
||||
|
|
Loading…
Reference in a new issue