Handle description and tag updates (#2856)

This commit is contained in:
Sriharsha Chintalapani 2022-02-18 17:52:13 -08:00 committed by GitHub
parent 647712c397
commit a8990b97f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -842,10 +842,12 @@ public class TableRepository extends EntityRepository<Table> {
for (Column deleted : deletedColumns) {
if (addedColumnMap.containsKey(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());
}
if (addedColumn.getTags().isEmpty() && !deleted.getTags().isEmpty()) {
if ((addedColumn.getTags() == null || addedColumn.getTags().isEmpty())
&& (deleted.getTags() == null || !deleted.getTags().isEmpty())) {
addedColumn.setTags(deleted.getTags());
}
}