Commit b6b93682 authored by Matija Obreza's avatar Matija Obreza
Browse files

Fix: owner references as UUID must be re-referenced

parent 5e1b1d8e
Pipeline #7049 passed with stages
in 5 minutes and 9 seconds
......@@ -14,6 +14,7 @@ import DatasetService from 'service/DatasetService';
// Util
import {log} from 'utilities/debug';
import { dereferenceReferences } from 'utilities';
const appendDatasetPage = (paged: Page<Dataset>, page, results, sortBy, filter: DatasetFilter, order) => ({
......@@ -49,6 +50,7 @@ function listDatasetsRequest(page?, results?, sortBy?: string[], filter?, order?
return DatasetService.datasetList(filter, {page, size: results, properties: sortBy, direction: order })
.then((paged) => {
dereferenceReferences(paged.content, 'owner');
if (paged.number === 0) {
dispatch(receiveDatasetPage(paged, page, results, sortBy, filter, order));
} else {
......@@ -65,6 +67,10 @@ function listDatasetsRequest(page?, results?, sortBy?: string[], filter?, order?
const promiselistDatasets = (page?, results?, sortBy?: string[], filter?, order?) => (dispatch, getState) => {
return DatasetService.datasetList(filter, { page, size: results, properties: sortBy, direction: order })
.then((paged) => {
dereferenceReferences(paged.content, 'owner');
return paged;
})
.catch((error) => {
log('Error', error);
return error;
......
......@@ -18,6 +18,7 @@ import DescriptorListService from 'service/DescriptorListService';
// Util
import { log } from 'utilities/debug';
import { dereferenceReferences } from 'utilities';
const receiveDescriptorList = (descriptorList: DescriptorList) => ({
......@@ -99,6 +100,7 @@ export const listDescriptorLists = (page?, results?, sortBy?: string[], filter?,
return DescriptorListService.listDescriptorLists(filter, { page, size: results, properties: sortBy, direction: order })
// receive the current descriptor list
.then((paged) => {
dereferenceReferences(paged.content, 'owner');
if (paged.number === 0) {
dispatch(receiveDescriptorLists(paged, page, results, sortBy, paged.filter, order));
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment