Files
notifications-api/tests/app/test_model.py
Leo Hemsted 38bb4ad6c2 notification.personalisation now always returns an empty dict
There are a variety of ways a notification can be created - via the
API, via CSV, via one-off messages, via the same but sent as a test -
the point is, there are lots of entry points, and lots of inconsistency
about how personalisation may be sent in. If there are no
personalisation options in the template, we may get either `None` or
`{}` - if the value is None, to avoid an error in our encryption lib,
we just store None in the database.

THIS ENDS NOW!

We've had some problems on the front-end that is caused by
notifications having the `None` value. This commit changes the
personalisation property getter and setter to store/return `{}`
rather than None.
2017-07-06 12:30:07 +01:00

6.0 KiB