Invalid condition on e-mail notification - version 12

I am trying to create an e-mail notification with a custom condition. What I need is a condition that checks a value in a date field of a child table from the doctype and counts it.

This is what I am using:
len(doc.get('autorizacoes_de_transito', {'vencimento_autorizacao': frappe.utils.getdate(frappe.utils.add_days(frappe.utils.nowdate(), 1))})) > 0

But I receive an invalid condition message like below

This condition works fine on Python

How could I solve that?