Skip to content

Commit a4f8356

Browse files
committed
Refactored AtlanClient to check for relationshipAttributes
1 parent fd53c3a commit a4f8356

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

pyatlan/client/atlan.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,13 @@ def get_asset_by_guid(
341341
GET_ENTITY_BY_GUID.format_path_with_params(guid),
342342
query_params,
343343
)
344-
raw_json["entity"]["attributes"].update(
345-
raw_json["entity"]["relationshipAttributes"]
346-
)
344+
if (
345+
"relationshipAttributes" in raw_json["entity"]
346+
and raw_json["entity"]["relationshipAttributes"]
347+
):
348+
raw_json["entity"]["attributes"].update(
349+
raw_json["entity"]["relationshipAttributes"]
350+
)
347351
raw_json["entity"]["relationshipAttributes"] = {}
348352
asset = AssetResponse[A](**raw_json).entity
349353
asset.is_incomplete = False

0 commit comments

Comments
 (0)