File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -580,7 +580,11 @@ def register_foil_hole(
580580 .id
581581 )
582582 if _transport_object :
583- _transport_object .do_insert_foil_hole (gsid .id , foil_hole_params )
583+ fh_ispyb_response = _transport_object .do_insert_foil_hole (
584+ gsid .id , foil_hole_params
585+ )
586+ else :
587+ fh_ispyb_response = {"success" : False , "return_value" : None }
584588 except NoResultFound :
585589 log .debug (
586590 f"Foil hole { sanitise (str (foil_hole_params .name ))} could not be registered as grid square { sanitise (str (gs_name ))} was not found"
@@ -592,6 +596,7 @@ def register_foil_hole(
592596 else :
593597 jpeg_size = (0 , 0 )
594598 foil_hole = FoilHole (
599+ id = fh_ispyb_response ["return_value" ] if fh_ispyb_response ["success" ] else None ,
595600 name = foil_hole_params .name ,
596601 session_id = session_id ,
597602 grid_square_id = gsid ,
You can’t perform that action at this time.
0 commit comments