Reload supervisors list when safety form loaded
See RT 221400. The list of people who are allowed to sign off safety forms is generated from the database. Because of the way WTForms works, the list is set when the code to define the safety form class is first run, and each safety form instance that is created gets the same list from the class. This is annoying when new people have been added to the list, as the applicaton doesn't see them until it restarts and hence re-runs the code to define the class. This change reloads the choices on the safety induction signer field on instances of the safety form immediately after they are created in the safety checklist view, thus immediately picking up new signers.
Please register or sign in to comment