fix: remove Config.get_attr config and use defaults for tags (#1559)

This commit is contained in:
Hayden 2022-08-14 11:31:29 -08:00 committed by GitHub
parent 3985713cbd
commit ad9ede20a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,9 +44,6 @@ class Tag(SqlAlchemyBase, BaseMixins):
slug = sa.Column(sa.String, index=True, nullable=False)
recipes = orm.relationship("RecipeModel", secondary=recipes_to_tags, back_populates="tags")
class Config:
get_attr = "slug"
@validates("name")
def validate_name(self, key, name):
assert name != ""