Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export function addClipboardNodeFromListener(context, obj) {
.then(() =>
context.dispatch(
'contentNode/loadContentNodes',
{ '[node_id+channel_id]__in': [obj.source_node_id, obj.source_channel_id] },
{ '[node_id+channel_id]__in': [[obj.source_node_id, obj.source_channel_id]] },
{ root }
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ describe('ContentNode methods', () => {
);
expect(table.get).toHaveBeenCalledWith({ '[node_id+channel_id]': [node_id, channel_id] });
expect(fetchCollection).toHaveBeenCalledWith({
_node_id_channel_id_: [node_id, channel_id],
'[node_id+channel_id]__in': [[node_id, channel_id]],
});
});

Expand All @@ -731,7 +731,7 @@ describe('ContentNode methods', () => {
await expect(ContentNode.getByNodeIdChannelId(node_id, channel_id)).resolves.toBeFalsy();
expect(table.get).toHaveBeenCalledWith({ '[node_id+channel_id]': [node_id, channel_id] });
expect(fetchCollection).toHaveBeenCalledWith({
_node_id_channel_id_: [node_id, channel_id],
'[node_id+channel_id]__in': [[node_id, channel_id]],
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,9 @@ export const ContentNode = new TreeResource({
const values = [nodeId, channelId];
return this.table.get({ '[node_id+channel_id]': values }).then(node => {
if (!node) {
return this.fetchCollection({ _node_id_channel_id_: values }).then(nodes => nodes[0]);
return this.fetchCollection({ '[node_id+channel_id]__in': [values] }).then(
nodes => nodes[0]
);
}
return node;
});
Expand Down