diff --git a/kfet/views.py b/kfet/views.py index 2fe284ad..8bca6462 100644 --- a/kfet/views.py +++ b/kfet/views.py @@ -1282,12 +1282,13 @@ def history_json(request): transfer_queryset_prefetch = Transfer.objects.select_related( 'from_acc__trigramme', 'to_acc__trigramme', + 'from_acc__id', 'to_acc__id', 'canceled_by__trigramme') if accounts: transfer_queryset_prefetch = transfer_queryset_prefetch.filter( - Q(from_acc__trigramme__in=accounts) | - Q(to_acc__trigramme__in=accounts)) + Q(from_acc__id__in=accounts) | + Q(to_acc__id__in=accounts)) if not request.user.has_perm('kfet.is_team'): acc = request.user.profile.account_kfet