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 )