Fix return type for `serialize` to work with SQLite
Fix return type for `serialize` to work with SQLite

This extra hoop-jumping isn't required on Python 3 so we should remove
it when we upgrade.

ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing