Skip to content

Commit

Permalink
deal with some new model quirks in new registry
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrum committed Aug 20, 2024
1 parent 9a829e0 commit 6fa705d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/Description.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export const previewLength = 750
export default function Description(props) {
const { model } = props;
const { display_description } = model;
const description = (display_description || model.description || model.instrument_description || model.instrument_host_description || model.investigation_description || model.target_description).trim()
let description = (display_description || model.description || model.instrument_description || model.instrument_host_description || model.investigation_description || model.target_description)
description = description ? description.trim() : ''
const alwaysShow = description.length < ridiculousLength;
const [expanded, setExpanded] = useState(alwaysShow);
const classes = useStyles();
Expand Down
3 changes: 3 additions & 0 deletions services/desolrize.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
function desolrize(dataset) {
for(let [key, value] of Object.entries(dataset)) {
if(key == "identifier" && value instanceof Array) {
dataset[key] = value[0]
}
if(key.includes(".")) {
unpackFlattened(dataset, key, value)
delete dataset[key]
Expand Down

0 comments on commit 6fa705d

Please sign in to comment.