mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-29 19:35:56 +00:00
MINOR: Fixed owner not updating from dbt if owners field has an empty list set in db (#17610)
* Fixed owner not updating from dbt for empty list * fix table get
This commit is contained in:
parent
4c354eabb2
commit
d6eb4fa9e8
@ -598,7 +598,7 @@ public class TableRepository extends EntityRepository<Table> {
|
||||
}
|
||||
|
||||
public Table addDataModel(UUID tableId, DataModel dataModel) {
|
||||
Table table = find(tableId, NON_DELETED);
|
||||
Table table = get(null, tableId, getFields(FIELD_OWNERS), NON_DELETED, false);
|
||||
|
||||
// Update the sql fields only if correct value is present
|
||||
if (dataModel.getRawSql() == null || dataModel.getRawSql().isBlank()) {
|
||||
@ -618,7 +618,7 @@ public class TableRepository extends EntityRepository<Table> {
|
||||
table.withDataModel(dataModel);
|
||||
|
||||
// Carry forward the table owners from the model to table entity, if empty
|
||||
if (table.getOwners() == null) {
|
||||
if (nullOrEmpty(table.getOwners())) {
|
||||
storeOwners(table, dataModel.getOwners());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user