I've got this:
template = '{{invoice.customer.address.city}}'
And it works fine. But sometimes invoice.customer is Null or invoice.customer.address is Null
and then jinja throws jinja2.exceptions.UndefinedError: 'None' has no attribute 'address'
because it can't reach that .city
part. So how do I tell it to just fail silently if it can't access an attribute?
Thanks!