mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-23 09:22:18 +00:00
Minor Fix - issues in SearchRepository.propagateGlossaryTags method (#19995)
* Fix - issues in SearchRepository.propagateGlossaryTags method * Refactor - format get_sample_query method for improved readability --------- Co-authored-by: Ayush Shah <ayush@getcollate.io>
This commit is contained in:
parent
851aa3ee0b
commit
88a4ce481f
@ -484,8 +484,7 @@ public class SearchRepository {
|
||||
for (FieldChange field : changeDescription.getFieldsAdded()) {
|
||||
if (propagateFields.contains(field.getName())) {
|
||||
List<TagLabel> tagLabels =
|
||||
JsonUtils.readObjects(
|
||||
(String) changeDescription.getFieldsAdded().get(0).getNewValue(), TagLabel.class);
|
||||
JsonUtils.readObjects((String) field.getNewValue(), TagLabel.class);
|
||||
tagLabels.forEach(tagLabel -> tagLabel.setLabelType(TagLabel.LabelType.DERIVED));
|
||||
fieldData.put("tagAdded", tagLabels);
|
||||
}
|
||||
@ -493,9 +492,7 @@ public class SearchRepository {
|
||||
for (FieldChange field : changeDescription.getFieldsDeleted()) {
|
||||
if (propagateFields.contains(field.getName())) {
|
||||
List<TagLabel> tagLabels =
|
||||
JsonUtils.readObjects(
|
||||
(String) changeDescription.getFieldsDeleted().get(0).getOldValue(),
|
||||
TagLabel.class);
|
||||
JsonUtils.readObjects((String) field.getOldValue(), TagLabel.class);
|
||||
tagLabels.forEach(tagLabel -> tagLabel.setLabelType(TagLabel.LabelType.DERIVED));
|
||||
fieldData.put("tagDeleted", tagLabels);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user