-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hello,
Found a bug with the list_connections method with the GovernanceGroupsApi. I get a 'from_dict' error response when calling the list_connections() method on a governance group with any object connections.
Traced the error down to an invalid 'from_dict' call on an 'sailpoint.v2025.models.connected_object_type' object type in the 'sailpoint.v2025.models.workgroup_connection_dto_object.py' 'from_dict' method.
The ConnectedObjectType object is an enum, but in the WorkgroupConnectionDtoObject file's from_dict method we call from_dict on the enum, which is not defined within the object which causes the error.
WorkgroupConnectionDtoObject from_dict function:
` def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"type": ConnectedObjectType.from_dict(obj["type"]) if obj.get("type") is not None else None,
"id": obj.get("id"),
"name": obj.get("name"),
"description": obj.get("description")
})
return _obj`
ConnectedObjectType class declaration:
`
ACCESS_PROFILE = 'ACCESS_PROFILE'
ROLE = 'ROLE'
SOD_POLICY = 'SOD_POLICY'
SOURCE = 'SOURCE'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of ConnectedObjectType from a JSON string"""
return cls(json.loads(json_str))
`