From 3bc8e0d8a71a6df443fc46006f8552c424d0f805 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Wed, 14 Jun 2023 12:38:26 -0700 Subject: [PATCH] fix backref --- superset/tags/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset/tags/models.py b/superset/tags/models.py index 6b9549ada1f97..d7feb4f48c4b1 100644 --- a/superset/tags/models.py +++ b/superset/tags/models.py @@ -77,8 +77,8 @@ class Tag(Model, AuditMixinNullable): name = Column(String(250), unique=True) type = Column(Enum(TagTypes)) - tagged_objects = relationship( - "TaggedObject", back_populates="tag", overlaps="tagged_objects,tags" + objects = relationship( + "TaggedObject", back_populates="tag", overlaps="objects,tags" ) @@ -97,7 +97,7 @@ class TaggedObject(Model, AuditMixinNullable): ) object_type = Column(Enum(ObjectTypes)) - tag = relationship("Tag", back_populates="tagged_objects", overlaps="tags") + tag = relationship("Tag", back_populates="objects", overlaps="tags") def get_tag(name: str, session: Session, type_: TagTypes) -> Tag: