Error if payment inconsistency occurs

There seems to be a new error in Indico 3.2.3. If an inconsistency in payment is detected, our payment plugin triggers notify_amount_inconsistency(registration, amount, currency) from While this worked fine previously, the function was changed and now we get

  File "[...]/indico/core/", line 28, in wrapper
    mails = fn(*args, **kwargs)
  File "[...]/indico/modules/events/payment/", line 19, in notify_amount_inconsistency
    return make_email(to, template=tpl)
  File "[...]/indico/util/", line 111, in _wrapper
    return func(*args, **kwargs)
  File "[...]/indico/core/", line 154, in make_email
    subject = template.get_subject()
AttributeError: 'TemplateModule' object has no attribute 'get_subject'

Or do we do something wrong?

Did you override the payment_inconsistency_email_to_manager.txt template somehow? It must inherit from {% extends 'emails/base_i18n.txt' %} (or emails/base.txt).

Not to my knowledge, but I’ll check.

Thanks for the help.
First, I did not expect template file to cause an object to lose a function.
Second, did we override the template? Yes and no :smiley: Someone copied the template into the custom folder without changing it, so it went unnoticed.

Template modules are basically a “compiled” version of the template (templates are internally compiled to Python), where all its macros are exposed as methods.

It would be very helpful if the error contained the path to the template in question :slight_smile: