Skip to content

Commit

Permalink
model.base: make String the default value_format of `DataSpecific…
Browse files Browse the repository at this point in the history
…ationIEC61360`
  • Loading branch information
jkhsjdhjs committed Apr 7, 2023
1 parent 2373167 commit 9da564c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions basyx/aas/model/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2152,7 +2152,7 @@ def __init__(self,
unit_id: Optional[Reference] = None,
source_of_definition: Optional[str] = None,
symbol: Optional[str] = None,
value_format: Optional[DataTypeDefXsd] = None,
value_format: DataTypeDefXsd = datatypes.String,
value_list: Optional[ValueList] = None,
value: Optional[ValueDataType] = None,
level_types: Iterable[IEC61360LevelType] = ()):
Expand All @@ -2168,9 +2168,9 @@ def __init__(self,
self._symbol: Optional[str] = symbol
self.value_list: Optional[ValueList] = value_list
self.level_types: Set[IEC61360LevelType] = set(level_types)
self.value_format: Optional[DataTypeDefXsd] = value_format
self._value: Optional[ValueDataType] = (datatypes.trivial_cast(value, self.value_format)
if (value is not None and self.value_format is not None) else None)
self.value_format: DataTypeDefXsd = value_format
self._value: Optional[ValueDataType] = datatypes.trivial_cast(value, self.value_format) if value is not None \
else None

@property
def value(self):
Expand Down

0 comments on commit 9da564c

Please sign in to comment.