From 002ff724ea02ab5b210cf7bd1e9d428f94294350 Mon Sep 17 00:00:00 2001 From: gryf Date: Sun, 25 Sep 2022 20:57:59 +0200 Subject: [PATCH] Make explicit relations between file and tags. --- pycatalog/dbobjects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pycatalog/dbobjects.py b/pycatalog/dbobjects.py index 61ad0c5..37c026d 100644 --- a/pycatalog/dbobjects.py +++ b/pycatalog/dbobjects.py @@ -104,7 +104,7 @@ class Tag(Base): tag = Column(Text) group = relation('Group', backref=backref('tags', remote_side="Group.id")) - files = relation("File", secondary=tags_files) + files = relation("File", secondary=tags_files, back_populates="tags") def __init__(self, tag=None, group=None): self.tag = tag