Skip to content

Commit

Permalink
Bug fix: getObsCoreProductType should return a string or undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
robyww committed Aug 24, 2023
1 parent f989be1 commit fbe6a7d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- [Notes on next version](next-release-details.md)

## Version 2023.2
- 2023.2.0 - (estimated: Aug 15, 2023)
- 2023.2.0 - (Aug 25, 2023)
- docker tag: `2023.2.0`

### _Notes_
Expand All @@ -22,7 +22,7 @@
- Obscore data results shows search target [Firefly-1291](https://github.com/Caltech-IPAC/firefly/pull/1411)

#### Other changes
- read FITS tables directly with `nom.tam.fits` (removed star table) [Firefly-1232](https://github.com/Caltech-IPAC/firefly/pull/1390)
- Read FITS tables directly with `nom.tam.fits` (removed star table) [Firefly-1232](https://github.com/Caltech-IPAC/firefly/pull/1390)
- improved DCE: [Firefly-1286](https://github.com/Caltech-IPAC/firefly/pull/1408), [Firefly-1250](https://github.com/Caltech-IPAC/firefly/pull/1391)
- Firefly now uses React 18 [Firefly-1127](https://github.com/Caltech-IPAC/firefly/pull/1396)
- Firefly now uses Mavin central [Firefly-1258](https://github.com/Caltech-IPAC/firefly/pull/1397)
Expand Down
12 changes: 9 additions & 3 deletions src/firefly/js/util/VOAnalyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* License information at https://github.com/Caltech-IPAC/firefly/blob/master/License.txt
*/

import {get, has, isArray, isEmpty, isObject, isString, intersection, unset} from 'lodash';
import {get, has, isArray, isEmpty, isObject, isString, intersection} from 'lodash';
import Enum from 'enum';
import {
getColumn,
Expand All @@ -19,6 +19,7 @@ import {getCornersColumns} from '../tables/TableInfoUtil.js';
import {MetaConst} from '../data/MetaConst.js';
import {CoordinateSys} from '../visualize/CoordSys.js';
import {makeAnyPt, makeWorldPt} from '../visualize/Point';
import {isDefined} from './WebUtil.js';


export const UCDCoord = new Enum(['eq', 'ecliptic', 'galactic']);
Expand Down Expand Up @@ -1306,12 +1307,17 @@ export const getObsTitle= (tableOrId, rowIdx) => {
*/
export const getObsCoreAccessURL= (tableOrId, rowIdx) => getObsCoreCellValue(tableOrId,rowIdx, 'access_url');
/**
* return dataproduct_type cell data
* return dataproduct_type cell data.
* and
* @param {TableModel|String} tableOrId - a table model or a table id
* @param rowIdx
* @param alwaysLowerCaseString - if data is defined then always return data as a lowercase string
* @return {string}
*/
export const getObsCoreProdType= (tableOrId, rowIdx) => getObsCoreCellValue(tableOrId,rowIdx, 'dataproduct_type');
export function getObsCoreProdType(tableOrId, rowIdx, alwaysLowerCaseString=true) {
const v= getObsCoreCellValue(tableOrId,rowIdx, 'dataproduct_type');
return (isDefined(v) && alwaysLowerCaseString) ? (v+'').toLowerCase() : v;
}


export function getProdTypeGuess(tableOrId, rowIdx) {
Expand Down

0 comments on commit fbe6a7d

Please sign in to comment.