Skip to content
Snippets Groups Projects
Commit c28a2673 authored by dcz's avatar dcz
Browse files

Unified frame fin statement count bugfix (absent verified unified frames)

parent e0f2ff60
Branches
No related merge requests found
from django.contrib.auth.decorators import permission_required
from django.contrib.auth.decorators import permission_required
from django.db.models import Q
from django.shortcuts import get_object_or_404, render, redirect
from django.utils.translation import gettext_lazy as _
......@@ -78,9 +79,11 @@ def statement_detail(request, pk):
:return: Redirecting to fin_statement_details
"""
statement = get_object_or_404(FinStatement, pk=pk)
unified_frames = UnifiedFrame.objects.filter(fin_statement=statement, status=choices.FrameStatus.READY)
mappings = UnifiedFrame2SlowalFrameMapping.objects.filter(unified_frame__in=unified_frames.all(),
slowal_frame__status=choices.FrameStatus.READY)
unified_frames = UnifiedFrame.objects.filter(Q(Q(fin_statement=statement, status=choices.FrameStatus.READY) |
Q(fin_statement=statement, status=choices.FrameStatus.VERIFIED)))
mappings = UnifiedFrame2SlowalFrameMapping.objects.filter(Q(Q(unified_frame__in=unified_frames.all()) &
Q(Q(slowal_frame__status=choices.FrameStatus.READY) |
Q(slowal_frame__status=choices.FrameStatus.VERIFIED))))
free_lu_frames = Frame.objects.filter(free_lu_user_assignment=statement.user, fin_statement=statement)
return render(request, 'fin_statement_details.html',
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment