The sale object passed from the background is sale = null
${sale.warrantyPeriod}
You will be prompted that warrantyperiod cannot be found. Change it to the following:
th:value="${sale?.warrantyPeriod}"
If the object is empty, the output is empty; if the object exists, the output property value.