Skip to content

Commit 89c846a

Browse files
committed
added case for empty observation
1 parent a226142 commit 89c846a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

astroquery/mast/observations.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,8 @@ def get_product_list_async(self, observations):
427427
-------
428428
response : list of `~requests.Response`
429429
"""
430+
if len(observations) == 0 or not observations["obsid"]:
431+
raise InvalidQueryError("Observation list is empty.")
430432

431433
# getting the obsid list
432434
if isinstance(observations, Row):

0 commit comments

Comments
 (0)