Skip to content

Commit

Permalink
Prevent adding missing images to range requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Taylor committed Jul 10, 2020
1 parent dc1e2ec commit eadb8a7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions application.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,14 @@ def _get_json_for_date_range(start_date, end_date, use_concept_tags, thumbs):
while start_ordinal <= end_ordinal:
# get data
dt = date.fromordinal(start_ordinal)

data = _apod_handler(dt, use_concept_tags, start_ordinal == today_ordinal, thumbs)

# Handle case where no data is available
if not data:
start_ordinal += 1
continue

data['service_version'] = SERVICE_VERSION

if data['date'] == dt.isoformat():
Expand Down

0 comments on commit eadb8a7

Please sign in to comment.