Skip to content

Commit a00828a

Browse files
vaibhavatlanAryamanz29
authored andcommitted
Minor Fixes
1 parent 2e8827c commit a00828a

File tree

4 files changed

+7
-27
lines changed

4 files changed

+7
-27
lines changed

pyatlan/client/asset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ def _modify_tags(
892892
reterieved_asset = self.get_by_qualified_name(
893893
qualified_name=qualified_name,
894894
asset_type=asset_type,
895-
attributes=["anchor"],
895+
attributes=[AtlasGlossaryTerm.ANCHOR.atlan_field_name],
896896
)
897897
if asset_type in (AtlasGlossaryTerm, AtlasGlossaryCategory):
898898
updated_asset = asset_type.updater(

pyatlan/generator/templates/referenceable_attributes.jinja2

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,6 @@
189189
default=None,
190190
description="Map of remove relationship attributes.",
191191
)
192-
classifications: Optional[List[AtlanTag]] = Field(
193-
default=None,
194-
description="Map of replace classifcations of atlan tag.",
195-
)
196192
add_or_update_classifications: Optional[List[AtlanTag]] = Field(
197193
default=None,
198194
description="Map of add/update classifcations of atlan tag.",

pyatlan/model/assets/core/referenceable.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,6 @@ def validate_required(self):
362362
default=None,
363363
description="Map of remove relationship attributes.",
364364
)
365-
classifications: Optional[List[AtlanTag]] = Field(
366-
default=None,
367-
description="Map of replace classifcations of atlan tag.",
368-
)
369365
add_or_update_classifications: Optional[List[AtlanTag]] = Field(
370366
default=None,
371367
description="Map of add/update classifcations of atlan tag.",

tests/integration/test_client.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -750,9 +750,7 @@ def test_add_classification(client: AtlanClient, term1: AtlasGlossaryTerm):
750750
client.asset.add_atlan_tags(
751751
AtlasGlossaryTerm, term1.qualified_name, [CLASSIFICATION_NAME]
752752
)
753-
glossary_term = client.asset.get_by_guid(
754-
term1.guid, asset_type=AtlasGlossaryTerm, attributes=["atlanTags"]
755-
)
753+
glossary_term = client.asset.get_by_guid(term1.guid, asset_type=AtlasGlossaryTerm)
756754
assert glossary_term.atlan_tags
757755
assert len(glossary_term.atlan_tags) == 1
758756
classification = glossary_term.atlan_tags[0]
@@ -797,9 +795,7 @@ def test_update_classification(client: AtlanClient, term1: AtlasGlossaryTerm):
797795
propagate=True,
798796
remove_propagation_on_delete=False,
799797
)
800-
glossary_term = client.asset.get_by_guid(
801-
term1.guid, asset_type=AtlasGlossaryTerm, attributes=["atlanTags"]
802-
)
798+
glossary_term = client.asset.get_by_guid(term1.guid, asset_type=AtlasGlossaryTerm)
803799
assert glossary_term.atlan_tags
804800
assert len(glossary_term.atlan_tags) == 1
805801
classification = glossary_term.atlan_tags[0]
@@ -816,9 +812,7 @@ def test_remove_classification(client: AtlanClient, term1: AtlasGlossaryTerm):
816812
client.asset.remove_atlan_tag(
817813
AtlasGlossaryTerm, term1.qualified_name, CLASSIFICATION_NAME
818814
)
819-
glossary_term = client.asset.get_by_guid(
820-
term1.guid, asset_type=AtlasGlossaryTerm, attributes=["atlanTags"]
821-
)
815+
glossary_term = client.asset.get_by_guid(term1.guid, asset_type=AtlasGlossaryTerm)
822816
assert not glossary_term.atlan_tags
823817

824818

@@ -829,9 +823,7 @@ def test_multiple_add_classification(client: AtlanClient, term1: AtlasGlossaryTe
829823
term1.qualified_name,
830824
[CLASSIFICATION_NAME, CLASSIFICATION_NAME2],
831825
)
832-
glossary_term = client.asset.get_by_guid(
833-
term1.guid, asset_type=AtlasGlossaryTerm, attributes=["atlanTags"]
834-
)
826+
glossary_term = client.asset.get_by_guid(term1.guid, asset_type=AtlasGlossaryTerm)
835827
assert glossary_term.atlan_tags
836828
assert len(glossary_term.atlan_tags) == 2
837829
classification = glossary_term.atlan_tags[0]
@@ -849,9 +841,7 @@ def test_multiple_update_classification(client: AtlanClient, term1: AtlasGlossar
849841
propagate=True,
850842
remove_propagation_on_delete=False,
851843
)
852-
glossary_term = client.asset.get_by_guid(
853-
term1.guid, asset_type=AtlasGlossaryTerm, attributes=["atlanTags"]
854-
)
844+
glossary_term = client.asset.get_by_guid(term1.guid, asset_type=AtlasGlossaryTerm)
855845
assert glossary_term.atlan_tags
856846
assert len(glossary_term.atlan_tags) == 2
857847
classification = glossary_term.atlan_tags[0]
@@ -876,9 +866,7 @@ def test_multiple_remove_classification(client: AtlanClient, term1: AtlasGlossar
876866
term1.qualified_name,
877867
[CLASSIFICATION_NAME, CLASSIFICATION_NAME2],
878868
)
879-
glossary_term = client.asset.get_by_guid(
880-
term1.guid, asset_type=AtlasGlossaryTerm, attributes=["atlanTags"]
881-
)
869+
glossary_term = client.asset.get_by_guid(term1.guid, asset_type=AtlasGlossaryTerm)
882870
assert not glossary_term.atlan_tags
883871

884872

0 commit comments

Comments
 (0)