Bug fix missing space launch data
This commit is contained in:
parent
3b89efa65f
commit
9506e5e60e
|
@ -266,7 +266,7 @@ async def get_data(
|
||||||
if not dt:
|
if not dt:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
rocket_name = f'🚀{launch["rocket"]}: {launch["mission"]["name"]}'
|
rocket_name = f'🚀{launch["rocket"]}: {launch["mission_name"] or "[no mission]"}'
|
||||||
e = Event(name="rocket", date=dt, title=rocket_name)
|
e = Event(name="rocket", date=dt, title=rocket_name)
|
||||||
events.append(e)
|
events.append(e)
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,8 @@ def summarize_launch(launch: Launch) -> Summary:
|
||||||
|
|
||||||
t0_date, t0_time = format_time(launch["net"], net_precision)
|
t0_date, t0_time = format_time(launch["net"], net_precision)
|
||||||
|
|
||||||
|
orbit = launch["mission"]["orbit"] if launch["mission"] else None
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"name": launch["name"],
|
"name": launch["name"],
|
||||||
"status": launch["status"],
|
"status": launch["status"],
|
||||||
|
@ -110,11 +112,12 @@ def summarize_launch(launch: Launch) -> Summary:
|
||||||
"launch_provider_type": launch["launch_service_provider"]["type"],
|
"launch_provider_type": launch["launch_service_provider"]["type"],
|
||||||
"rocket": launch["rocket"]["configuration"]["full_name"],
|
"rocket": launch["rocket"]["configuration"]["full_name"],
|
||||||
"mission": launch["mission"],
|
"mission": launch["mission"],
|
||||||
|
"mission_name": (launch["mission"]["name"] if launch["mission"] else None),
|
||||||
"pad_name": launch["pad"]["name"],
|
"pad_name": launch["pad"]["name"],
|
||||||
"pad_wikipedia_url": launch["pad"]["wiki_url"],
|
"pad_wikipedia_url": launch["pad"]["wiki_url"],
|
||||||
"location": launch["pad"]["location"]["name"],
|
"location": launch["pad"]["location"]["name"],
|
||||||
"country_code": launch["pad"]["country_code"],
|
"country_code": launch["pad"]["country_code"],
|
||||||
"orbit": launch["mission"]["orbit"],
|
"orbit": orbit,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -216,9 +216,13 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
— {{ launch.location }}<br/>
|
— {{ launch.location }}<br/>
|
||||||
|
|
||||||
{% for line in launch.mission.description.splitlines() %}
|
{% if launch.mission %}
|
||||||
<p>{{ line }}</p>
|
{% for line in launch.mission.description.splitlines() %}
|
||||||
{% endfor %}
|
<p>{{ line }}</p>
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<p>No description.</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue