Skip to content

When Class is derived from BaseClass enum validation is not working correctly. #56

@jaunruh

Description

@jaunruh

I am using MongoDB and since MongoDB adds a "_id" field before saving an element to the Database, I made a Base class as follows:

mongo_db_base_schema = {
	'type': 'object',
	'properties': {'_id': {}},
}
BaseClass = warlock.model_factory(mongo_db_base_schema)

When I now use SomeOtherModel = warlock.model_factory(other_model_schema, base_class=BaseClass) where other_model_schema contains an enum, my enum validation stops working.

EDIT:
It does not seem to just break enum validation. For me it breaks the entire validation. So using a BaseClass is pretty much useless because my entire validation breaks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions