forked from DGNum/gestioCOF
K-Psul - Fix erreur 500 caisse inexistante
This commit is contained in:
parent
7f8c825c2a
commit
59dcb72542
1 changed files with 21 additions and 22 deletions
|
@ -835,7 +835,6 @@ def kpsul_checkout_data(request):
|
|||
pk = request.POST.get('pk', 0)
|
||||
if not pk:
|
||||
pk = 0
|
||||
try:
|
||||
data = (Checkout.objects
|
||||
.annotate(
|
||||
last_statement_by_first_name=F('statements__by__cofprofile__user__first_name'),
|
||||
|
@ -855,8 +854,8 @@ def kpsul_checkout_data(request):
|
|||
.filter(pk=pk)
|
||||
.order_by('statements__at')
|
||||
.last())
|
||||
except Checkout.DoesNotExist:
|
||||
raise http404
|
||||
if data is None:
|
||||
raise Http404
|
||||
return JsonResponse(data)
|
||||
|
||||
@teamkfet_required
|
||||
|
|
Loading…
Add table
Reference in a new issue