Print_badge_template signal

I need to perform some actions when a badges are printed. These actions require to know which registration is printed. I noticed the existence of a signal (indico.core.signals.event.print_badge_template) that can apparently help on it.
unfortunately this signal has no information about the registrations are going to be printed.

Is there any way around to know which registration is going to be printed?
If no, is possible tho add this information to the to the print_badge_template.send method?

Send a PR (against 2.2-maintenance if necessary, otherwise master) that adds the registrations to the signal and we’ll merge it). registrations would probably be a good name for the new kwarg.

In one of the two places where the signal gets sent you’ll have to query the list of registrations first though since the code where the signal gets called only has access to the ids right now…

Correct, is not better to use registration_ids as is already implemented in that place, and leave the plugin eventually to fetch the Registration objects if required?
It looks better to not fetch non-needed objects (for performance).

That would work as well, my thought was that all the other signals also work with objects and not ids, and fetching them isn’t particularly expensive anyway.

Ok, I’m going to create a pull-request with objects

Thanks! I left some comments; once you updated the PR I think we can merge it.

I applied the requested changes replied to your comments on github