Skip to content

Commit

Permalink
fix: Don't set temporalCoverage if no dates
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Nov 7, 2024
1 parent 8ef856f commit 65e9d3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data_registry/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def detail(request, pk):
"dateModified": collection.modified.isoformat(),
}

if job:
if job and (job.date_from or job.date_to):
dataset["temporalCoverage"] = "/".join(
date.strftime("%Y-%m-%d") if date else ".." for date in (job.date_from, job.date_to)
)
Expand Down

0 comments on commit 65e9d3c

Please sign in to comment.