Skip to content

Commit

Permalink
fix field validator
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Feb 13, 2025
1 parent 88230c3 commit 300a226
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/antares/craft/service/local_services/models/area.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# This file is part of the Antares project.
import ast

from typing import Any, Union
from typing import Any, Sequence, Union

from antares.craft.model.area import AdequacyPatchMode, AreaProperties, AreaPropertiesUpdate, default_filtering
from antares.craft.model.commons import FilterOption
Expand All @@ -38,8 +38,8 @@ class FilteringPropertiesLocal(LocalBaseModel, alias_generator=to_kebab):
def validate_accuracy_on_correlation(cls, v: Any) -> set[str]:
if v is None:
return set()
if isinstance(v, set):
return v
if isinstance(v, (Sequence, set)):
return set(v)
return set(ast.literal_eval(v))


Expand Down

0 comments on commit 300a226

Please sign in to comment.