From 983422ae05f231eaba5a14a173346b1803d27637 Mon Sep 17 00:00:00 2001 From: Dan Funk Date: Wed, 19 Aug 2020 08:25:03 -0400 Subject: [PATCH] fixing a bug that would prevent the proper listing of personnel options types. --- pb/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pb/__init__.py b/pb/__init__.py index b5c2f66..1344bb7 100644 --- a/pb/__init__.py +++ b/pb/__init__.py @@ -199,7 +199,7 @@ def new_investigator(study_id): form = InvestigatorForm(request.form) # 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 existing_types = [i.INVESTIGATORTYPE for i in investigators] existing_types = list(filter(lambda a: a != "AS_C", existing_types))