Skip to content

Commit

Permalink
replace doc_type with subtype property (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
allyoucanmap authored Jul 29, 2021
1 parent 7b18744 commit d08b7a3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion geonode_mapstore_client/client/js/api/geonode/v2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export const getDocumentsByDocType = (docType = 'image', {
params: {
...params,
...(sort && { sort: isArray(sort) ? sort : [ sort ]}),
'filter{doc_type}': [docType],
'filter{subtype}': [docType],
page,
page_size: pageSize
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function DetailsPanel({
formatDetailUrl = res => res?.detail_url,
icon,
name
} = resource && (types[resource.doc_type] || types[resource.resource_type]) || {};
} = resource && (types[resource.subtype] || types[resource.resource_type]) || {};
const embedUrl = resource?.embed_url && formatEmbedUrl(resource);
const detailUrl = resource?.pk && formatDetailUrl(resource);
const documentDownloadUrl = (resource?.href && resource?.href.includes('download')) ? resource?.href : undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const ResourceCard = forwardRef(({

const res = data;
const types = getTypesInfo();
const { icon } = types[res.doc_type] || types[res.resource_type] || {};
const { icon } = types[res.subtype] || types[res.resource_type] || {};

return (
<div
Expand Down

0 comments on commit d08b7a3

Please sign in to comment.