Changed serialize(flat=True) into flatten()
Made flatten ignore none

This makes sense because the basic usecase for flatten is to write data
to key value storages. Data that is none will be none when expanded
from the flat dict.
serialize doesn't raise errors when role isn't found in embedded models.
Merge