An AttributeError was raised when setting up indexes if there's a model that have no indexes.
If you set up indexes using the approach suggested in the README, i.e. models=get_all_subclasses(Model), and there's at least one sub-model that does not define __composite_indexes__ an AttributeError was raised. This PR fixes that by adding the default value None, so you don't need to manually define it for each sub-class or make your own intermediate base class.
If you defined a prefix for the collections, the prefix was ignored when creating the indexes, i.e. you didn't get an index for the collection you were actually using, but for one with the same name minus the prefix.
There were two issues with setting up indexes:
models=get_all_subclasses(Model)
, and there's at least one sub-model that does not define__composite_indexes__
anAttributeError
was raised. This PR fixes that by adding the default valueNone
, so you don't need to manually define it for each sub-class or make your own intermediate base class.