File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -325,6 +325,11 @@ def _make_observation(
325325 dq_code ,
326326 row .GlobalID ,
327327 )
328+ self ._capture_error (
329+ row .PointID ,
330+ f"Mapped DataQuality '{ dq_code } ' to NaN; stored NULL" ,
331+ "DataQuality" ,
332+ )
328333 data_quality = None
329334 else :
330335 mapped_quality_text = str (mapped_quality ).strip ()
@@ -338,11 +343,21 @@ def _make_observation(
338343 dq_code ,
339344 row .GlobalID ,
340345 )
346+ self ._capture_error (
347+ row .PointID ,
348+ f"Mapped DataQuality '{ dq_code } ' to empty value; stored NULL" ,
349+ "DataQuality" ,
350+ )
341351 data_quality = None
342352 except KeyError :
343353 logger .warning (
344354 f"{ SPACE_6 } Unknown DataQuality code '{ dq_code } ' for WaterLevels record { row .GlobalID } "
345355 )
356+ self ._capture_error (
357+ row .PointID ,
358+ f"Unknown DataQuality code '{ dq_code } '" ,
359+ "DataQuality" ,
360+ )
346361
347362 # TODO: after sensors have been added to the database update sensor_id (or sensor) for waterlevels that come from db sensors (like e probes?)
348363 observation = Observation (
You can’t perform that action at this time.
0 commit comments