Skip to content

Commit

Permalink
Handle description and tag updates (#2856)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshach committed Feb 19, 2022
1 parent 647712c commit a8990b9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -842,10 +842,12 @@ private void updateColumns(
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());
}
}
Expand Down

0 comments on commit a8990b9

Please sign in to comment.