Skip to content

Commit

Permalink
fix for 4 LocationType testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer authored Feb 9, 2024
1 parent fd9add1 commit dc0de24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hydrolib/core/dflowfm/ini/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,10 @@ def get_length(field: str):
def validate_location_type(expected_location_type: LocationType) -> None:
location_type = values.get(fields.location_type.lower(), None)
if str_is_empty_or_none(location_type):
values[fields.location_type.lower()] = expected_location_type
elif location_type != expected_location_type:
values[fields.location_type.lower()] = expected_location_type.value
elif location_type != expected_location_type.value:
raise ValueError(
f"{fields.location_type} should be {expected_location_type} but was {location_type}"
f"{fields.location_type} should be {expected_location_type.value} but was {location_type}"
)

def validate_coordinates_with_num_coordinates() -> None:
Expand Down

0 comments on commit dc0de24

Please sign in to comment.