fixing a bug that would prevent the proper listing of personnel options types.

This commit is contained in:
Dan Funk 2020-08-19 08:25:03 -04:00
parent f63dfa82b6
commit 983422ae05

View File

@ -199,7 +199,7 @@ def new_investigator(study_id):
form = InvestigatorForm(request.form) form = InvestigatorForm(request.form)
# Remove options from form if unique investigator already exist, but AS_C and SI can happen many times. # Remove options from form if unique investigator already exist, but AS_C and SI can happen many times.
investigators = db.session.query(Investigator).filter(Study.STUDYID == study_id).all() investigators = db.session.query(Investigator).filter(Investigator.STUDYID == study_id).all()
choices = form.INVESTIGATORTYPE.choices choices = form.INVESTIGATORTYPE.choices
existing_types = [i.INVESTIGATORTYPE for i in investigators] existing_types = [i.INVESTIGATORTYPE for i in investigators]
existing_types = list(filter(lambda a: a != "AS_C", existing_types)) existing_types = list(filter(lambda a: a != "AS_C", existing_types))