Skip to content

Commit 7703aba

Browse files
committed
If no foil holes in the grid square, don't register them
1 parent 632285c commit 7703aba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/murfey/util/spa_metadata.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ def foil_hole_data(xml_path: Path, foil_hole: int, grid_square: int) -> FoilHole
157157
serialization_array = data["TargetLocations"]["TargetLocationsEfficient"][
158158
"a:m_serializationArray"
159159
]
160+
if len(serialization_array.keys()) == 0:
161+
return FoilHoleInfo(id=foil_hole, grid_square_id=grid_square)
160162
for key in serialization_array.keys():
161163
if key.startswith("b:KeyValuePairOfintTargetLocation"):
162164
required_key = key

0 commit comments

Comments
 (0)