do multiple update at once
This commit is contained in:
parent
9fb04c661d
commit
50823e5688
@ -63,9 +63,11 @@ def accounting_confirm(request, pk):
|
||||
if 'accountings' in request.POST:
|
||||
acc_ids = ast.literal_eval(request.POST['accountings'])
|
||||
if len(acc_ids) > 0:
|
||||
Accounting.objects.filter(id__in=acc_ids).update(billed=True)
|
||||
Accounting.objects.filter(id__in=acc_ids).update(account_user=request.user.username)
|
||||
Accounting.objects.filter(id__in=acc_ids).update(account_tst=timezone.now())
|
||||
Accounting.objects.filter(id__in=acc_ids).update(
|
||||
billed=True,
|
||||
account_user=request.user.username,
|
||||
account_tst=timezone.now(),
|
||||
)
|
||||
resp = redirect('billard:accounting_detail', pk=pk)
|
||||
return resp
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user