Make sure our db query returned a result.

If not, don't seed data to the form.
This commit is contained in:
mike cullerton 2021-06-30 13:35:59 -04:00
parent 359f864572
commit 1b80f62136

View File

@ -97,6 +97,7 @@ def edit_irb_info(study_id):
action = BASE_HREF + "/irb_info/" + study_id action = BASE_HREF + "/irb_info/" + study_id
title = "Edit IRB Info #" + study_id title = "Edit IRB Info #" + study_id
if request.method == 'GET': if request.method == 'GET':
if irb_info:
if irb_info.IRBEVENT and irb_info.IRBEVENT.first(): if irb_info.IRBEVENT and irb_info.IRBEVENT.first():
event = irb_info.IRBEVENT.first().EVENT event = irb_info.IRBEVENT.first().EVENT
event_id = irb_info.IRBEVENT.first().EVENT_ID event_id = irb_info.IRBEVENT.first().EVENT_ID