Skip to content

Commit aac5c95

Browse files
committed
fix(well inventory): check for Nones to avoid truthiness traps
1 parent 4c0db46 commit aac5c95

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

services/well_inventory_csv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ def _add_csv_row(session: Session, group: Group, model: WellInventoryRow, user)
837837
session.add(sample)
838838
session.flush()
839839

840-
if model.depth_to_water_ft and not universal_mp_height:
840+
if model.depth_to_water_ft is not None and universal_mp_height is None:
841841
raise ValueError(
842842
"measuring_point_height_ft or mp_height is required when depth_to_water_ft is provided for a non-null observation"
843843
)

0 commit comments

Comments
 (0)