From 84a564935d0bb08c76652085d696a75067dd3643 Mon Sep 17 00:00:00 2001 From: David Erb Date: Wed, 26 Apr 2023 09:00:26 +0100 Subject: [PATCH] small change to composer --- src/echolocator_lib/composers/html.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/echolocator_lib/composers/html.py b/src/echolocator_lib/composers/html.py index e93c9f6..4f338b9 100644 --- a/src/echolocator_lib/composers/html.py +++ b/src/echolocator_lib/composers/html.py @@ -52,7 +52,7 @@ def compose_image_list(self, models: List[CrystalWellNeedingDroplocationModel]): {"text": "Offset y (\u03BCm)", "class": "T_real_space_target_y"}, {"text": "drop", "class": "T_is_drop"}, {"text": "well centroid x,y", "class": "T_well_centroid_x_y"}, - {"text": "auto x,y", "class": "T_auto_target__x_y"}, + {"text": "auto x,y", "class": "T_auto_target_x_y"}, {"text": "confirmed x,y", "class": "T_confirmed_target_x_y"}, {"text": "echo coordinate x,y", "class": "T_echo_coordinate_x_y"}, {"text": "use", "class": "T_is_usable"}, @@ -128,10 +128,16 @@ def compose_image_list(self, models: List[CrystalWellNeedingDroplocationModel]): t = "no" html_lines.append("" + str(t) + "") - t = f"{model.well_centroid_x}, {model.well_centroid_y}" + if model.well_centroid_x is None or model.well_centroid_y is None: + t = "-" + else: + t = f"{model.well_centroid_x}, {model.well_centroid_y}" html_lines.append("" + t + "") - t = f"{model.auto_target_x}, {model.auto_target_y}" + if model.auto_target_x is None or model.auto_target_y is None: + t = "-" + else: + t = f"{model.auto_target_x}, {model.auto_target_y}" html_lines.append("" + t + "") if model.confirmed_target_x is None or model.confirmed_target_y is None: