Skip to content

Commit 1720738

Browse files
committed
Issue #790: Fix where there are no extensions but attribute has extended-by-data-model
1 parent e088f71 commit 1720738

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)