Skip to content

Commit

Permalink
Correct assigned term detection and decoding
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Grote <[email protected]>
  • Loading branch information
cmgrote committed Dec 19, 2023
1 parent c8f4039 commit f18858c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ object AssetRefXformer {
GlossaryTerm.CATEGORIES.atlanFieldName,
-> GlossaryCategoryXformer.decode(assetRef, fieldName)
GlossaryCategory.ANCHOR.atlanFieldName -> GlossaryXformer.decode(assetRef, fieldName)
in GlossaryTermXformer.TERM_TO_TERM_FIELDS -> GlossaryTermXformer.decode(assetRef, fieldName)
"assignedTerms", in GlossaryTermXformer.TERM_TO_TERM_FIELDS -> GlossaryTermXformer.decode(assetRef, fieldName)
else -> {
val tokens = assetRef.split(TYPE_QN_DELIMITER)
val typeName = tokens[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ object GlossaryTermXformer {
fieldName: String,
): Asset {
return when (fieldName) {
Asset.ASSIGNED_TERMS.atlanFieldName, in TERM_TO_TERM_FIELDS,
"assignedTerms", in TERM_TO_TERM_FIELDS,
-> TermCache.getByIdentity(assetRef)?.trimToReference()
?: throw NoSuchElementException("Term $assetRef not found (via $fieldName).")
else -> AssetRefXformer.decode(assetRef, fieldName)
Expand Down

0 comments on commit f18858c

Please sign in to comment.