Skip to content

Commit 962af77

Browse files
authored
Issue #790: Fix where there are no extensions but attribute has extended-by-data-model (#850)
##### Description of Change Fixes a false negative when checking a transformation attribute where the entity and attribute are in the base lif, but associated via the org lif. ##### Related Issues Related to #790
2 parents 89b9899 + 1720738 commit 962af77

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

components/lif/mdr_services/transformation_service.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,14 @@ async def check_transformation_attribute(session: AsyncSession, anchor_data_mode
238238
elif (
239239
current_node.Extension == False
240240
and previous_node.Extension == False
241-
and association.ExtendedByDataModelId is None
241+
and (
242+
association.ExtendedByDataModelId is None
243+
or association.ExtendedByDataModelId == anchor_data_model_id
244+
)
242245
):
243246
found_valid_association = True
244247
logger.info(
245-
f"{signature} - Attribute association from parent {previous_node.Id} to child {raw_node_id} is valid (Extension on current and parent are false, and the association ExtendedByDataModelId is None)"
248+
f"{signature} - Attribute association from parent {previous_node.Id} to child {raw_node_id} is valid (Extension on current and parent are false, and the association ExtendedByDataModelId is None or the anchor data model)"
246249
)
247250
break
248251
logger.info(

0 commit comments

Comments
 (0)