3👍
✅
You can simply use {% if not order.payment %}
, and I’m pretty sure you can also use {% if not order.payment.exists %}
, or {% if order.payment is None %}
3👍
blank is not the state of a field. If a field is blank, then it means that no value is required to be passed. The for example a default value is used.
You can check if a value is NULL
by checking if the value is None
:
{% if order.payment is None %}
…
{% endif %}
Source:stackexchange.com