Webhooks: default tracking event tags=[], metadata={}

If a tracking event doesn't contain tags or metadata, set the event
record fields to tags=[] or metadata={} to simplify checking values.

Closes #67
This commit is contained in:
medmunds
2017-06-30 16:56:36 -07:00
parent e39614e5a5
commit fc59707133
11 changed files with 25 additions and 18 deletions

View File

@@ -139,12 +139,14 @@ Normalized tracking event
.. attribute:: metadata
A `dict` of unique data attached to the message, or `None`.
A `dict` of unique data attached to the message. Will be empty if the ESP
doesn't provide metadata with its tracking events.
(See :attr:`AnymailMessage.metadata <anymail.message.AnymailMessage.metadata>`.)
.. attribute:: tags
A `list` of `str` tags attached to the message, or `None`.
A `list` of `str` tags attached to the message. Will be empty if the ESP
doesn't provide tags with its tracking events.
(See :attr:`AnymailMessage.tags <anymail.message.AnymailMessage.tags>`.)
.. attribute:: reject_reason