mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-03 20:45:23 +02:00
fix: remove Config.get_attr config and use defaults for tags (#1559)
This commit is contained in:
parent
3985713cbd
commit
ad9ede20a2
1 changed files with 0 additions and 3 deletions
|
@ -44,9 +44,6 @@ class Tag(SqlAlchemyBase, BaseMixins):
|
||||||
slug = sa.Column(sa.String, index=True, nullable=False)
|
slug = sa.Column(sa.String, index=True, nullable=False)
|
||||||
recipes = orm.relationship("RecipeModel", secondary=recipes_to_tags, back_populates="tags")
|
recipes = orm.relationship("RecipeModel", secondary=recipes_to_tags, back_populates="tags")
|
||||||
|
|
||||||
class Config:
|
|
||||||
get_attr = "slug"
|
|
||||||
|
|
||||||
@validates("name")
|
@validates("name")
|
||||||
def validate_name(self, key, name):
|
def validate_name(self, key, name):
|
||||||
assert name != ""
|
assert name != ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue