Skip to content

Commit 9507c6c

Browse files
ryanjdewSanjeevani19
authored andcommitted
DHFPROD-8145: Update mapping namespaces on save
1 parent dc66861 commit 9507c6c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

marklogic-data-hub-central/ui/src/components/entities/mapping/mapping-step-detail/mapping-step-detail.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ const MappingStepDetail: React.FC = () => {
308308

309309
const updateMappingWithNamespaces = async (mapDataLocal) => {
310310
let {lastUpdated, ...dataPayload} = mapDataLocal;
311-
dataPayload["namespaces"] = nmspaces;
311+
dataPayload["namespaces"] = Object.assign({}, mapDataLocal.namespaces, nmspaces);
312312
setMapData({...dataPayload});
313313
};
314314

@@ -1211,6 +1211,7 @@ const MappingStepDetail: React.FC = () => {
12111211
} else {
12121212
dataPayload = {...dataPayload, uriExpression: updatedUri, properties: obj};
12131213
}
1214+
dataPayload.namespaces = Object.assign({}, dataPayload.namespaces, namespaces);
12141215
let mapSavedResult = await updateMappingArtifact(dataPayload);
12151216
if (mapSavedResult) {
12161217
setErrorInSaving("noError");

0 commit comments

Comments
 (0)