Skip to content

Commit 6fcd070

Browse files
committed
Review comments
1 parent 1a79afb commit 6fcd070

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

featuremanagement/_time_window_filter/_models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ def __init__(self, range_data: Dict[str, Any]):
8888
end_date_str = range_data.get("EndDate", "")
8989
self.end_date = parsedate_to_datetime(end_date_str) if end_date_str else None
9090
self.num_of_occurrences = range_data.get("NumberOfOccurrences", 0)
91+
if self.num_of_occurrences < 0:
92+
raise ValueError("The number of occurrences must be greater than or equal to 0.")
9193

9294

9395
class Recurrence: # pylint: disable=too-few-public-methods

0 commit comments

Comments
 (0)