mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-09 03:04:54 -04:00
fix: remove Config.get_attr config and use defaults for tags (#1559)
This commit is contained in:
parent
3985713cbd
commit
ad9ede20a2
@ -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…
x
Reference in New Issue
Block a user