Skip to content

Commit

Permalink
Fix 79 schema 224 bugs (#388)
Browse files Browse the repository at this point in the history
Modify modelchecker for requested name changes
  • Loading branch information
margrietpalm authored Sep 2, 2024
1 parent 7b4f929 commit acdd52c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Changelog of threedi-modelchecker
2.10.2 (unreleased)
-------------------

- Nothing changed yet.
- Rename groundwater.equilibrium_infiltration_rate_type to equilibrium_infiltration_rate_aggregation
- Rename control_measure_location.object_id to connection_node_id


2.10.1 (2024-08-20)
Expand Down
14 changes: 7 additions & 7 deletions threedi_modelchecker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1412,12 +1412,12 @@ def is_none_or_empty(col):
),
QueryCheck(
error_code=406,
column=models.GroundWater.equilibrium_infiltration_rate_type,
column=models.GroundWater.equilibrium_infiltration_rate_aggregation,
invalid=Query(models.GroundWater).filter(
models.GroundWater.equilibrium_infiltration_rate_type == None,
models.GroundWater.equilibrium_infiltration_rate_aggregation == None,
~is_none_or_empty(models.GroundWater.equilibrium_infiltration_rate_file),
),
message="groundwater.equilibrium_infiltration_rate_type should be defined when using an equilibrium_infiltration_rate_file.",
message="groundwater.equilibrium_infiltration_rate_aggregation should be defined when using an equilibrium_infiltration_rate_file.",
),
QueryCheck(
error_code=407,
Expand Down Expand Up @@ -2564,7 +2564,7 @@ def is_none_or_empty(col):
CHECKS += [
ForeignKeyCheck(
error_code=1220,
column=models.ControlMeasureLocation.object_id,
column=models.ControlMeasureLocation.connection_node_id,
reference_column=models.ConnectionNode.id,
)
]
Expand Down Expand Up @@ -2642,7 +2642,7 @@ def is_none_or_empty(col):
models.ControlTable.target_type,
models.ControlMeasureMap.weight,
models.ControlMeasureMap.control_measure_location_id,
models.ControlMeasureLocation.object_id,
models.ControlMeasureLocation.connection_node_id,
]
CHECKS += [
NotNullCheck(error_code=1230 + i, column=col) for i, col in enumerate(not_null_cols)
Expand Down Expand Up @@ -3106,8 +3106,8 @@ def generate_checks(self):
"v2_grid_refinement.the_geom": "warning",
"v2_grid_refinement_area.the_geom": "warning",
"v2_dem_average_area.the_geom": "warning",
"v2_surface.the_geom": "warning",
"v2_impervious_surface.the_geom": "warning",
"surface.geom": "warning",
"dry_weather_flow.geom": "warning",
},
error_code=5,
)
Expand Down

0 comments on commit acdd52c

Please sign in to comment.