Skip to content

Commit 0e496e0

Browse files
YihuiGuoYihui Guo
andauthored
Fix purview registry bug (#583)
Co-authored-by: Yihui Guo <yihgu@microsofot.com>
1 parent 8d33733 commit 0e496e0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

registry/purview-registry/registry/purview_registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def create_project_anchor(self, project_id: UUID, definition: AnchorDef) -> UUID
328328
def create_project_anchor_feature(self, project_id: UUID, anchor_id: UUID, definition: AnchorFeatureDef) -> UUID:
329329
attrs = definition.to_attr().to_dict()
330330
project_entity = self.get_entity(project_id)
331-
anchor_entity = self.get_entity(anchor_id)
331+
anchor_entity = self.get_entity(anchor_id,True)
332332
qualified_name = self.registry_delimiter.join([project_entity.qualified_name,
333333
anchor_entity.attributes.name,
334334
attrs['name']])
@@ -344,7 +344,7 @@ def create_project_anchor_feature(self, project_id: UUID, anchor_id: UUID, defin
344344

345345
# change from AtlasEntity to Entity
346346
anchor_feature_entity = self.get_entity(anchor_feature_entity.guid)
347-
source_entity = self.get_entity(anchor_entity.id)
347+
source_entity = self.get_entity(anchor_entity.attributes.source.id)
348348

349349
project_contains_feature_relation = self._generate_relation_pairs(
350350
project_entity, anchor_feature_entity, Label_Contains)

0 commit comments

Comments
 (0)