Document generation after manager recreates field

Hi, I’m trying to help after a conference manager error. “Not possible” is an acceptable answer, but I still got to ask :slight_smile: (Also if not possible I think this could become a feature request)

We have a paid conference having a registration form with two paid selections. Payment is via credit card. However for one of the fields many registrations now show warning “This field no longer exists”. My current theory is somewhere in between a organizer accidentally deleted one of the selections and immediately recreated it, but have no confirmation could still be a different reason.

We are now facing the problem creating receipts that match the paid amount. On the individual registration pages the fields are still displayed with warning “This field no longer exists”, also they are correctly displayed in the “Invoice” section.

My question is can I access any of these fields in document generation? And are there protections that I can enable to prevent this in the future?

The info is at least present in the db. Each created form field does have its own id (thats why delting and recreation sounds like a likely reason). So you could find the affected field and reset it’s deleted flag using indico shell.

# rough outline how to find and fix form field

from indico.modules.events.registration.models.form_field import RegistrationFormField, RegistrationForm

rf= RegistrationForm.filter_by(eventid=...).query.all()
.. identify form id

rfd = RegistrationFormField()

fields= rfd.query.filter_by(registration_form_id=<found form id>).all()

... find relevant field

field.is_deleted =  False

db.session.comit()

1 Like

wow. that is an amazing suggestion. I will check what we can recover. Thanks.