views:

28

answers:

1

I've got MongoKit structure like this:

structure = {
  ...

  'plugin': {
    'id': unicode,
    'title': unicode,
    'description': unicode,

  ...
}

However, not all documents will have the plugin key. If they do, I'd like it to be validated against the structure.

required_fields does not include plugin. (plugin isn't a required key.)

I've tried 'plugin': OR(None, {...}), but OR doesn't like None as a value.

Any ideas?