mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-25 10:20:10 +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()) {
|
for (FieldChange field : changeDescription.getFieldsAdded()) {
|
||||||
if (propagateFields.contains(field.getName())) {
|
if (propagateFields.contains(field.getName())) {
|
||||||
List<TagLabel> tagLabels =
|
List<TagLabel> tagLabels =
|
||||||
JsonUtils.readObjects(
|
JsonUtils.readObjects((String) field.getNewValue(), TagLabel.class);
|
||||||
(String) changeDescription.getFieldsAdded().get(0).getNewValue(), TagLabel.class);
|
|
||||||
tagLabels.forEach(tagLabel -> tagLabel.setLabelType(TagLabel.LabelType.DERIVED));
|
tagLabels.forEach(tagLabel -> tagLabel.setLabelType(TagLabel.LabelType.DERIVED));
|
||||||
fieldData.put("tagAdded", tagLabels);
|
fieldData.put("tagAdded", tagLabels);
|
||||||
}
|
}
|
||||||
@ -493,9 +492,7 @@ public class SearchRepository {
|
|||||||
for (FieldChange field : changeDescription.getFieldsDeleted()) {
|
for (FieldChange field : changeDescription.getFieldsDeleted()) {
|
||||||
if (propagateFields.contains(field.getName())) {
|
if (propagateFields.contains(field.getName())) {
|
||||||
List<TagLabel> tagLabels =
|
List<TagLabel> tagLabels =
|
||||||
JsonUtils.readObjects(
|
JsonUtils.readObjects((String) field.getOldValue(), TagLabel.class);
|
||||||
(String) changeDescription.getFieldsDeleted().get(0).getOldValue(),
|
|
||||||
TagLabel.class);
|
|
||||||
tagLabels.forEach(tagLabel -> tagLabel.setLabelType(TagLabel.LabelType.DERIVED));
|
tagLabels.forEach(tagLabel -> tagLabel.setLabelType(TagLabel.LabelType.DERIVED));
|
||||||
fieldData.put("tagDeleted", tagLabels);
|
fieldData.put("tagDeleted", tagLabels);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user