Skip to content

Commit

Permalink
Clear some messages and push to debug the warning about none values
Browse files Browse the repository at this point in the history
Clear some messages and push to debug the warning about none values
  • Loading branch information
ponceta committed Oct 18, 2024
1 parent a742861 commit 31cd472
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
5 changes: 2 additions & 3 deletions qgepqwat2ili/qgep/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,8 @@ def textpos_common(row, t_type, geojson_crs_def):
# --- _rel_ ---
# elevation_determination__REL, fk_dataowner__REL, fk_pipe_profile__REL, fk_provider__REL, fk_reach_point_from__REL, fk_reach_point_to__REL, fk_wastewater_structure__REL, horizontal_positioning__REL, inside_coating__REL, material__REL, reliner_material__REL, relining_construction__REL, relining_kind__REL

logger.warning(
"QGEP field reach.elevation_determination has no equivalent in the interlis model. It will be ignored."
)
# QGEP field reach.elevation_determination has no equivalent in the interlis model. It will be ignored.

haltung = ABWASSER.haltung(
# FIELDS TO MAP TO ABWASSER.haltung
# --- baseclass ---
Expand Down
2 changes: 1 addition & 1 deletion qgepqwat2ili/qgep/import_.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_vl_instance(vl_table, value):
# TODO : return "other" (or other applicable value) rather than None, or even throwing an exception, would probably be better
row = qgep_session.query(vl_table).filter(vl_table.value_de == value).first()
if row is None:
logger.warning(
logger.debug(
f'Could not find value `{value}` in value list "{vl_table.__table__.schema}.{vl_table.__name__}". Setting to None instead.'
)
return None
Expand Down
2 changes: 1 addition & 1 deletion qgepqwat2ili/qgepdss/import_.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_vl_instance(vl_table, value):
if row is None:
# write logger.warning only if value is not None
if value is not None:
logger.warning(
logger.debug(
f'Could not find value `{value}` in value list "{vl_table.__table__.schema}.{vl_table.__name__}". Setting to None instead.'
)
return None
Expand Down
5 changes: 2 additions & 3 deletions qgepqwat2ili/qgepsia405/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,9 +642,8 @@ def textpos_common(row, t_type, geojson_crs_def):
# --- _rel_ ---
# elevation_determination__REL, fk_dataowner__REL, fk_pipe_profile__REL, fk_provider__REL, fk_reach_point_from__REL, fk_reach_point_to__REL, fk_wastewater_structure__REL, horizontal_positioning__REL, inside_coating__REL, material__REL, reliner_material__REL, relining_construction__REL, relining_kind__REL

logger.warning(
"QGEP field reach.elevation_determination has no equivalent in the interlis model. It will be ignored."
)
# QGEP field reach.elevation_determination has no equivalent in the interlis model. It will be ignored.

haltung = ABWASSER.haltung(
# FIELDS TO MAP TO ABWASSER.haltung
# --- baseclass ---
Expand Down
2 changes: 1 addition & 1 deletion qgepqwat2ili/qgepsia405/import_.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_vl_instance(vl_table, value):
# TODO : return "other" (or other applicable value) rather than None, or even throwing an exception, would probably be better
row = qgep_session.query(vl_table).filter(vl_table.value_de == value).first()
if row is None:
logger.warning(
logger.debug(
f'Could not find value `{value}` in value list "{vl_table.__table__.schema}.{vl_table.__name__}". Setting to None instead.'
)
return None
Expand Down

0 comments on commit 31cd472

Please sign in to comment.