From a3c1c883be3a7d9ddc598390959059f0877a7467 Mon Sep 17 00:00:00 2001 From: Vidya Ramakrishnan Date: Wed, 29 Nov 2023 10:59:33 +0530 Subject: [PATCH] Update jsonld to include virtual location when event is missing a primary venue --- funnel/transports/email/send.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/funnel/transports/email/send.py b/funnel/transports/email/send.py index f31343c0c..040a14c4b 100644 --- a/funnel/transports/email/send.py +++ b/funnel/transports/email/send.py @@ -91,7 +91,10 @@ def jsonld_event_reservation(rsvp: Rsvp) -> dict[str, object]: } location['address'] = postal_address else: - location = rsvp.project.location + location = { + "@type": "VirtualLocation", + "url": rsvp.project.absolute_url, + } return { '@context': 'https://schema.org', '@type': 'EventReservation', @@ -116,6 +119,7 @@ def jsonld_event_reservation(rsvp: Rsvp) -> dict[str, object]: 'performer': { '@type': 'Organization', 'name': rsvp.project.account.title, + 'image': rsvp.project.account.logo_url }, }, 'numSeats': '1',