Skip to content
Open
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
7 changes: 4 additions & 3 deletions Development/src/dataProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
UPDATE,
fetchUtils,
} from 'react-admin';
import { assign, get, has, isEmpty, set } from 'lodash';
import { assign, get, has, isEmpty, pick, set } from 'lodash';
import { JsonPointer } from 'json-ptr';
import diff from 'deep-diff';
import { makeBearerAuthHeader } from './authProvider';
Expand Down Expand Up @@ -589,11 +589,12 @@ const convertDataProviderRequestToHTTP = (
// 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) {
const activation = get(params, 'data.$staged.activation');
if (get(activation, 'mode') != null) {
set(
patchData,
'activation',
get(params, 'data.$staged.activation')
pick(activation, ['mode', 'requested_time'])
);
}

Expand Down