File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -503,12 +503,11 @@ class ExperimentPeriod(BaseModel):
503503 @field_validator ("condition_ids" , mode = "before" )
504504 @classmethod
505505 def _validate_ids (cls , condition_ids ):
506- if condition_ids is None :
506+ if condition_ids in [ None , []] :
507507 return []
508508
509509 for condition_id in condition_ids :
510- # condition_id may be empty
511- if condition_id and not is_valid_identifier (condition_id ):
510+ if is_valid_identifier (condition_id ):
512511 raise ValueError (f"Invalid ID: `{ condition_id } '" )
513512 return condition_ids
514513
@@ -900,7 +899,7 @@ def _validate_id(cls, v):
900899 @field_validator ("prior_parameters" , mode = "before" )
901900 @classmethod
902901 def _validate_prior_parameters (cls , v ):
903- if isinstance ( v , float ) and np . isnan (v ):
902+ if pd . isna (v ):
904903 return []
905904
906905 if isinstance (v , str ):
You can’t perform that action at this time.
0 commit comments