Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Development/src/dataProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,20 @@ const convertDataProviderRequestToHTTP = (
JsonPointer.set(patchData, `/${d.path.join('/')}`, d.rhs, true);
}

// Activation in a PATCH is a request, not staged state. Include it whenever
// the request has a non-null mode, even if GET /staged already reported the
// same values (otherwise deep-diff omits it). That also covers non-conformant
// devices that leave activate_immediate on /staged (see #97). A null mode is
// only sent when it appears in the differences, so unrelated edits do not
// cancel a pending activation.
if (get(params, 'data.$staged.activation.mode') != null) {
set(
patchData,
'activation',
get(params, 'data.$staged.activation')
);
}

if (has(patchData, 'transport_file')) {
if (get(patchData, 'transport_file.data') === null) {
set(patchData, 'transport_file.type', null);
Expand Down
Loading