mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-06 16:18:05 +00:00
Handle description and tag updates (#2856)
This commit is contained in:
parent
647712c397
commit
a8990b97f7
@ -842,10 +842,12 @@ public class TableRepository extends EntityRepository<Table> {
|
|||||||
for (Column deleted : deletedColumns) {
|
for (Column deleted : deletedColumns) {
|
||||||
if (addedColumnMap.containsKey(deleted.getName())) {
|
if (addedColumnMap.containsKey(deleted.getName())) {
|
||||||
Column addedColumn = addedColumnMap.get(deleted.getName());
|
Column addedColumn = addedColumnMap.get(deleted.getName());
|
||||||
if (addedColumn.getDescription().isEmpty() && !deleted.getDescription().isEmpty()) {
|
if ((addedColumn.getDescription() == null || addedColumn.getDescription().isEmpty())
|
||||||
|
&& (deleted.getDescription() == null || !deleted.getDescription().isEmpty())) {
|
||||||
addedColumn.setDescription(deleted.getDescription());
|
addedColumn.setDescription(deleted.getDescription());
|
||||||
}
|
}
|
||||||
if (addedColumn.getTags().isEmpty() && !deleted.getTags().isEmpty()) {
|
if ((addedColumn.getTags() == null || addedColumn.getTags().isEmpty())
|
||||||
|
&& (deleted.getTags() == null || !deleted.getTags().isEmpty())) {
|
||||||
addedColumn.setTags(deleted.getTags());
|
addedColumn.setTags(deleted.getTags());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user