Another error made at the same time as the previous one was to call the model constructors with positional args:

mm = MyModel ('name', 'description')

This resulted in creating a MyModel instance like this:

mm.id = 'name' 
mm.name = 'description'
mm.description = None

I should have called them with keyword args so the passed values would be assigned to the right attributes:

mm = MyModel (name = 'name', description = 'description')