mirror of
https://github.com/OpenSPG/openspg.git
synced 2025-12-24 13:44:34 +00:00
fix
This commit is contained in:
parent
da5713e457
commit
cb018592b5
@ -164,6 +164,16 @@ class BaseProperty(ABC):
|
||||
"""
|
||||
return self._rest_model.object_type_ref.basic_info.name.name_en
|
||||
|
||||
@object_type_name_en.setter
|
||||
def object_type_name_en(self, object_type_name_en: str) -> str:
|
||||
"""Gets the object_type_name_en of this Property/Relation. # noqa: E501
|
||||
|
||||
|
||||
:return: The object_type_name_en of this Property/Relation. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
self._rest_model.object_type_ref.basic_info.name.name_en = object_type_name_en
|
||||
|
||||
@object_type_name.setter
|
||||
def object_type_name(self, object_type_name: str):
|
||||
"""Sets the object_type_name of this Property/Relation.
|
||||
@ -532,9 +542,11 @@ class BaseProperty(ABC):
|
||||
elif isinstance(value, typing.Dict):
|
||||
result[attr] = dict(
|
||||
map(
|
||||
lambda item: (item[0], item[1].to_dict())
|
||||
if hasattr(item[1], "to_dict")
|
||||
else item,
|
||||
lambda item: (
|
||||
(item[0], item[1].to_dict())
|
||||
if hasattr(item[1], "to_dict")
|
||||
else item
|
||||
),
|
||||
value.items(),
|
||||
)
|
||||
)
|
||||
@ -867,9 +879,11 @@ class BaseSpgType(ABC):
|
||||
elif isinstance(value, typing.Dict):
|
||||
result[attr] = dict(
|
||||
map(
|
||||
lambda item: (item[0], item[1].to_dict())
|
||||
if hasattr(item[1], "to_dict")
|
||||
else item,
|
||||
lambda item: (
|
||||
(item[0], item[1].to_dict())
|
||||
if hasattr(item[1], "to_dict")
|
||||
else item
|
||||
),
|
||||
value.items(),
|
||||
)
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user