From 2dc0e921efd2bbe3cb1024451d29f89a2fb7528c Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Fri, 22 Jan 2021 21:15:23 +1100 Subject: [PATCH] added people to file in the ORM --- files.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files.py b/files.py index afcc4f3..2974458 100644 --- a/files.py +++ b/files.py @@ -21,6 +21,7 @@ import time ################################################################################ from settings import Settings from job import Job, Joblog, NewJob +from person import Person ################################################################################ # Class describing File in the database, and via sqlalchemy, connected to the DB as well @@ -61,6 +62,7 @@ class File(db.Model): size_mb = db.Column(db.Integer, unique=False, nullable=False) hash = db.Column(db.Integer, unique=True, nullable=True) thumbnail = db.Column(db.String, unique=False, nullable=True) + people = db.relationship("Person", secondary="file_person_link" ) def __repr__(self): return "".format(self.eid, self.size_mb, self.hash )