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

@@ -89,7 +89,7 @@ class PostmarkTrackingWebhookView(PostmarkBaseWebhookView):
try:
tags = [esp_event['Tag']]
except KeyError:
tags = None
tags = []
return AnymailTrackingEvent(
description=esp_event.get('Description', None),