mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-27 10:26:09 +00:00
Fix - Existing custom properties getting removed on import of empty extension column (#19234)
This commit is contained in:
parent
1c793cc268
commit
0d3393c3c1
@ -2840,6 +2840,13 @@ public abstract class EntityRepository<T extends EntityInterface> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (operation == Operation.PUT && updatedExtension == null) {
|
||||||
|
// Revert change to non-empty extension if it is being updated by a PUT request
|
||||||
|
// For PUT operations, existing extension can't be removed.
|
||||||
|
updated.setExtension(origExtension);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
List<JsonNode> added = new ArrayList<>();
|
List<JsonNode> added = new ArrayList<>();
|
||||||
List<JsonNode> deleted = new ArrayList<>();
|
List<JsonNode> deleted = new ArrayList<>();
|
||||||
JsonNode origFields = JsonUtils.valueToTree(origExtension);
|
JsonNode origFields = JsonUtils.valueToTree(origExtension);
|
||||||
|
@ -211,7 +211,8 @@ public class MlModelRepository extends EntityRepository<MlModel> {
|
|||||||
.getFeatureSources()
|
.getFeatureSources()
|
||||||
.forEach(
|
.forEach(
|
||||||
mlFeatureSource -> {
|
mlFeatureSource -> {
|
||||||
EntityReference targetEntity = getEntityReference(mlFeatureSource.getDataSource(), Include.ALL);
|
EntityReference targetEntity =
|
||||||
|
getEntityReference(mlFeatureSource.getDataSource(), Include.ALL);
|
||||||
if (targetEntity != null) {
|
if (targetEntity != null) {
|
||||||
addRelationship(
|
addRelationship(
|
||||||
targetEntity.getId(),
|
targetEntity.getId(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user