Skip to content

Commit 7692979

Browse files
Add schedule verification prior to fetch
1 parent 74cc4cf commit 7692979

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/virtualship/cli/_fetch.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ def _fetch(path: str | Path, username: str | None, password: str | None) -> None
4545
schedule = _get_schedule(path)
4646
ship_config = _get_ship_config(path)
4747

48-
if schedule.space_time_region is None:
49-
raise ValueError(
50-
"space_time_region not found in schedule, please define it to fetch the data."
51-
)
48+
schedule.verify(
49+
ship_config.ship_speed_knots,
50+
input_data=None,
51+
check_space_time_region=True,
52+
ignore_missing_fieldsets=True
53+
)
5254

5355
space_time_region_hash = get_space_time_region_hash(schedule.space_time_region)
5456

0 commit comments

Comments
 (0)