You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is no metadata attached a tracking event the metadata field is set to None. This is a bit inconvenient while handling tracking events as it introduces an extra conditional before accessing the datastructure:
if event.metadata:
value = event.metadata.get(key)
Setting metadata = {} instead removes the need for the conditional.
The text was updated successfully, but these errors were encountered:
That seems reasonable. I think my intent was for None to indicate the ESP hadn't included metadata in the webhook, so we couldn't be sure whether that meant the message was sent without metadata, or whether the ESP simply didn't pass it along with the event. But looking at the implementation, I don't think it ended up working that way.
I wonder if tags should also be initialized to [] rather than None, for similar reasons.
If there is no metadata attached a tracking event the metadata field is set to
None
. This is a bit inconvenient while handling tracking events as it introduces an extra conditional before accessing the datastructure:Setting
metadata = {}
instead removes the need for the conditional.The text was updated successfully, but these errors were encountered: