Show changes in launch JSON

This commit is contained in:
Edward Betts 2024-07-09 08:22:48 +01:00
parent d1898686e9
commit b38ec99628

View file

@ -9,6 +9,7 @@ import typing
from datetime import date, datetime
from time import time
import deepdiff # type: ignore
import flask
import requests
@ -87,16 +88,14 @@ def report_space_launch_change(
name = prev_launch["name"]
subject = f"Change to {name}"
differences = deepdiff.DeepDiff(prev_launch, cur_launch)
body = f"""
A space launch of interest was updated.
Get ready for two big piles of JSON.
Old launch data
{json.dumps(prev_launch, indent=2)}
New launch data
{json.dumps(cur_launch, indent=2)}
{json.dumps(differences, indent=2)}
"""
agenda.mail.send_mail(config, subject, body)