fix recurent and layout none
All checks were successful
Deploy Amap / deploy (push) Successful in 9s

This commit is contained in:
Julien Aldon
2026-02-20 16:26:19 +01:00
parent 05480b44df
commit 72f8005fbd
2 changed files with 2 additions and 2 deletions

View File

@@ -111,7 +111,7 @@ async def get_base_contract_template(
session: Session = Depends(get_session), session: Session = Depends(get_session),
): ):
form = form_service.get_one(session, form_id) form = form_service.get_one(session, form_id)
recurrents = [pr for pr in form.productor.products if pr.type == models.ProductType.RECCURENT] recurrents = list(map(lambda x: {"product": x, "quantity": None}, filter(lambda product: product.type == models.ProductType.RECCURENT, form.productor.products)))
occasionals = [{ occasionals = [{
'shipment': sh, 'shipment': sh,
'price': None, 'price': None,

View File

@@ -274,7 +274,7 @@
else ""}} else ""}}
</td> </td>
<td> <td>
{{rec.quantity}}{{"g" if rec.product.unit == "1" else "kg" if {{rec.product.quantity if rec.product.quantity != None else ""}}{{"g" if rec.product.unit == "1" else "kg" if
rec.product.unit == "2" else "p" }} rec.product.unit == "2" else "p" }}
</td> </td>
</tr> </tr>