@@ -107,6 +107,10 @@ class RiskV2(BaseModel):
107107 prob : Optional [float ] = Field (None , alias = "Prob" )
108108 matches : List [RiskMatchV2 ] = Field ([], alias = "Matches" )
109109
110+ @field_validator ('matches' , mode = "before" )
111+ def convert_risk_matches_none_to_list (cls , value ):
112+ return [] if value is None else value
113+
110114 class Config :
111115 populate_by_name = True
112116
@@ -130,6 +134,10 @@ class PermitV2(BaseModel):
130134 prob : Optional [float ] = Field (None , alias = "Prob" )
131135 matches : List [PermitMatchV2 ] = Field ([], alias = "Matches" )
132136
137+ @field_validator ('matches' , mode = "before" )
138+ def convert_permit_matches_none_to_list (cls , value ):
139+ return [] if value is None else value
140+
133141 class Config :
134142 populate_by_name = True
135143
@@ -176,6 +184,10 @@ class DecisionV2(BaseModel):
176184 decision_strategy_id : Optional [str ] = Field (None , alias = "DecisionStrategyID" )
177185 hit_strategy_ids : List [str ] = Field ([], alias = "HitStrategyIDs" )
178186
187+ @field_validator ('hit_strategy_ids' , mode = "before" )
188+ def convert_hit_strategies_none_to_list (cls , value ):
189+ return [] if value is None else value
190+
179191 class Config :
180192 populate_by_name = True
181193
0 commit comments