Skip to content

Commit 2096f1e

Browse files
authored
Merge pull request #662 from atlanhq/APP-7132
APP-7132: Fixed FS `search` criteria used for `get_by_qualified_name/guid` method to include asset `type_name`
2 parents 238ae72 + 65e7845 commit 2096f1e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pyatlan/client/asset.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,10 @@ def get_by_qualified_name(
439439
related_attributes and len(related_attributes)
440440
):
441441
search = (
442-
FluentSearch().select().where(Asset.QUALIFIED_NAME.eq(qualified_name))
442+
FluentSearch()
443+
.select()
444+
.where(Asset.QUALIFIED_NAME.eq(qualified_name))
445+
.where(Asset.TYPE_NAME.eq(asset_type.__name__))
443446
)
444447
for attribute in attributes:
445448
search = search.include_on_results(attribute)
@@ -509,7 +512,12 @@ def get_by_guid(
509512
if (attributes and len(attributes)) or (
510513
related_attributes and len(related_attributes)
511514
):
512-
search = FluentSearch().select().where(Asset.GUID.eq(guid))
515+
search = (
516+
FluentSearch()
517+
.select()
518+
.where(Asset.GUID.eq(guid))
519+
.where(Asset.TYPE_NAME.eq(asset_type.__name__))
520+
)
513521
for attribute in attributes:
514522
search = search.include_on_results(attribute)
515523
for relation_attribute in related_attributes:

0 commit comments

Comments
 (0)