@db.validates('category')
    def validate_category(self, key, category):
        assert category in ('basic', 'map')
        return category
dataset/ETHPy150Open eleme/polaris/polaris/models.py/Chart.validate_category/original