Skip to content

Commit 40872f7

Browse files
authored
Merge pull request #3189 from rickynilsson/fix_issue_3090
Fix InvalidTableError for DI_STARS_EXEP and TD tables in ipac.nexsci.nasa_exoplanet_archive
2 parents ce23722 + a10f569 commit 40872f7

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ ipac.nexsci.nasa_exoplanet_archive
7474

7575
- Add missing unit strings to unit mapper. ``micron``, ``microns``, and ``uas``. [#3188]
7676

77+
- Fixed InvalidTableError for DI_STARS_EXEP and TD tables. [#3189]
78+
7779

7880
Infrastructure, Utility and Other Changes and Additions
7981
-------------------------------------------------------

astroquery/ipac/nexsci/nasa_exoplanet_archive/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def query_criteria_async(self, table, get_query_payload=False, cache=None, **cri
233233
if cache is None:
234234
cache = self.CACHE
235235

236-
if table in self.TAP_TABLES:
236+
if table in [tab.lower() for tab in self.TAP_TABLES]:
237237
tap = pyvo.dal.tap.TAPService(baseurl=self.URL_TAP, session=self._session)
238238
# construct query from table and request_payload (including format)
239239
tap_query = self._request_to_sql(request_payload)

astroquery/ipac/nexsci/nasa_exoplanet_archive/tests/test_nasa_exoplanet_archive_remote.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,10 @@ def test_format():
185185
with pytest.raises(InvalidQueryError) as error:
186186
NasaExoplanetArchive.query_object("HAT-P-11 b", format="json")
187187
assert "json" in str(error)
188+
189+
190+
@pytest.mark.remote_data
191+
def test_table_case_sensivity():
192+
# Regression test from #3090
193+
table = NasaExoplanetArchive.query_criteria(table='DI_STARS_EXEP', select='*')
194+
assert len(table) > 0

0 commit comments

Comments
 (0)