Issue #1384
closedHTTP 500 when retrieving importers that have with null configs
Description
It is possible(Pulp < 2.8) to have null values in the db for the `config` field of an importer. This breaks the serializer which was new in 2.7.0.
This is how to reproduce:
1. Create a repository without importers or distributors (do not use CLI)
http --json -a admin:admin --verify=no POST https://localhost/pulp/api/v2/repositories/ id=test
2. Associate an importer with this repository
http --json -a admin:admin --verify=no POST 'https://localhost/pulp/api/v2/repositories/test/importers/' importer_type_id=yum_importer
3. Attempt to retrieve the importer
http --json -a admin:admin --verify=no GET 'https://localhost/pulp/api/v2/repositories/test/?importers=true'
I have confirmed that this is not a problem for Pulp < 2.7.0 and that it is not a problem for Pulp >= 2.8. The broken serializer did not exist previously, and the Mongoengine documents convert `null` to an empty dict because `config` is a DictField.
This could be an issue in other places in the API, and if those objects have not been converted to Mongoengine they will be broken in master as well.
The specific cause is that the base serializer allows modification (removal and masking) of fields within an object, and it assumed that the fields being modified exist.
serializer should not fail if masked field is None
closes #1384