Skip to content

Commit d8863dc

Browse files
committed
[generator] Fixed stucts templates
1 parent 9f7fd02 commit d8863dc

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

pyatlan/generator/templates/structs.jinja2

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class {{struct.name}}(AtlanObject):
8787
is_source_tag_synced: Optional[bool] = None,
8888
source_tag_sync_error: Optional[str] = None,
8989
):
90-
from pyatlan.cache.source_tag_cache import SourceTagCache
90+
from pyatlan.client.atlan import AtlanClient
9191
"""
9292
Create a source-synced tag attachment with
9393
a particular value when the attachment is synced to the source.
@@ -102,7 +102,9 @@ class {{struct.name}}(AtlanObject):
102102
:raises AtlanError: on any error communicating via the underlying APIs
103103
:raises NotFoundError: if the source-synced tag cannot be resolved
104104
"""
105-
tag = SourceTagCache.get_by_name(name)
105+
tag = AtlanClient.get_current_client().source_tag_cache.get_by_name(
106+
name
107+
)
106108
tag_connector_name = AtlanConnectorType._get_connector_type_from_qualified_name(
107109
tag.qualified_name or ""
108110
)
@@ -129,7 +131,7 @@ class {{struct.name}}(AtlanObject):
129131
is_source_tag_synced: Optional[bool] = None,
130132
source_tag_sync_error: Optional[str] = None,
131133
):
132-
from pyatlan.cache.source_tag_cache import SourceTagCache
134+
from pyatlan.client.atlan import AtlanClient
133135
"""
134136
Create a source-synced tag attachment with
135137
a particular value when the attachment is synced to the source.
@@ -144,7 +146,9 @@ class {{struct.name}}(AtlanObject):
144146
:raises AtlanError: on any error communicating via the underlying APIs
145147
:raises NotFoundError: if the source-synced tag cannot be resolved
146148
"""
147-
tag = SourceTagCache.get_by_qualified_name(source_tag_qualified_name)
149+
tag = AtlanClient.get_current_client().source_tag_cache.get_by_qualified_name(
150+
source_tag_qualified_name
151+
)
148152
tag_connector_name = AtlanConnectorType._get_connector_type_from_qualified_name(
149153
source_tag_qualified_name or ""
150154
)

0 commit comments

Comments
 (0)