diff --git a/contentcuration/contentcuration/frontend/channelEdit/vuex/clipboard/actions.js b/contentcuration/contentcuration/frontend/channelEdit/vuex/clipboard/actions.js index d6327f65fe..af95347d20 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/vuex/clipboard/actions.js +++ b/contentcuration/contentcuration/frontend/channelEdit/vuex/clipboard/actions.js @@ -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 } ) ) diff --git a/contentcuration/contentcuration/frontend/shared/data/__tests__/ContentNodeResource.spec.js b/contentcuration/contentcuration/frontend/shared/data/__tests__/ContentNodeResource.spec.js index b8fc305e93..542d0ca6aa 100644 --- a/contentcuration/contentcuration/frontend/shared/data/__tests__/ContentNodeResource.spec.js +++ b/contentcuration/contentcuration/frontend/shared/data/__tests__/ContentNodeResource.spec.js @@ -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]], }); }); @@ -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]], }); }); }); diff --git a/contentcuration/contentcuration/frontend/shared/data/resources.js b/contentcuration/contentcuration/frontend/shared/data/resources.js index 89d99945f9..e23399479f 100644 --- a/contentcuration/contentcuration/frontend/shared/data/resources.js +++ b/contentcuration/contentcuration/frontend/shared/data/resources.js @@ -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; });