Skip to content
This repository was archived by the owner on May 4, 2019. It is now read-only.

Commit 6bff489

Browse files
committed
Fix BC for GET_MANY_REFERENCE
1 parent c50bb53 commit 6bff489

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aor-json-rest-client",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "A local REST client for admin-on-rest",
55
"main": "lib/index.js",
66
"scripts": {

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ export default (data, loggingEnabled = false) => {
6363
case GET_MANY:
6464
return restServer.getAll(resource, { filter: { id: params.ids } });
6565
case GET_MANY_REFERENCE: {
66+
if (!query.pagination && !query.sort) {
67+
// FIXME remove condition once aor 0.8 is released
68+
return restServer.getAll(resource, { filter: { [params.target]: params.id } });
69+
}
6670
const { page, perPage } = params.pagination;
6771
const { field, order } = params.sort;
6872
const query = {

0 commit comments

Comments
 (0)