Skip to content

Commit

Permalink
Update sunpy/net/jsoc/jsoc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Mar 20, 2024
1 parent 8b6ada1 commit 205828b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sunpy/net/jsoc/jsoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,14 +747,14 @@ def _lookup_records(self, iargs):
log.debug(f"Running following query: {ds}")
log.debug(f"Requesting following keywords: {key}")
result = client.query(ds, key=key, seg=segments_passed, rec_index=is_meta)
if result is None or result.empty:
return astropy.table.Table()
if segments_passed :
if segments_passed:
# DRMS returns a tuple of length 2 if there is segment information
query_result, segment_result = result[0], result[1]
query_result = pd.concat([query_result, segment_result],axis=1)
else:
query_result = result
if result is None or result.empty:
return astropy.table.Table()
return astropy.table.Table.from_pandas(query_result)

@classmethod
Expand Down

0 comments on commit 205828b

Please sign in to comment.