aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fatcat/models.py13
-rw-r--r--fatcat/sql.py2
2 files changed, 0 insertions, 15 deletions
diff --git a/fatcat/models.py b/fatcat/models.py
index 210d71a6..43e0bfea 100644
--- a/fatcat/models.py
+++ b/fatcat/models.py
@@ -17,16 +17,6 @@ from fatcat import db
### Inter-Entity Relationships ###############################################
-class WorkContrib(db.Model):
- __tablename__ = "work_contrib"
- work_rev= db.Column(db.ForeignKey('work_rev.id'), nullable=False, primary_key=True)
- creator_ident_id = db.Column(db.ForeignKey('creator_ident.id'), nullable=False, primary_key=True)
- type = db.Column(db.String, nullable=True)
- stub = db.Column(db.String, nullable=True)
-
- creator = db.relationship("CreatorIdent")
- work = db.relationship("WorkRev")
-
class ReleaseContrib(db.Model):
__tablename__ = "release_contrib"
release_rev = db.Column(db.ForeignKey('release_rev.id'), nullable=False, primary_key=True)
@@ -70,9 +60,6 @@ class WorkRev(db.Model):
work_type = db.Column(db.String)
primary_release_id = db.Column(db.ForeignKey('release_ident.id'), nullable=True)
- creators = db.relationship('WorkContrib', lazy='subquery',
- backref=db.backref('works', lazy=True))
-
class WorkIdent(db.Model):
"""
If rev_id is null, this was deleted.
diff --git a/fatcat/sql.py b/fatcat/sql.py
index 6ca56b46..45980925 100644
--- a/fatcat/sql.py
+++ b/fatcat/sql.py
@@ -222,14 +222,12 @@ def hydrate_work(wid):
primary = None
if work.revision.primary_release_id:
primary = hydrate_release(work.revision.primary_release_id)
- creators = [c.creator_id for c in WorkContrib.query.filter(WorkContrib.work == work).all()]
#releases = [r.id for r in ReleaseIdent.query.filter(ReleaseIdent.revision.work_id==work.id).all()]
releases = []
hydro.update({
"work_type": work.revision.work_type,
"title": work.revision.title,
"primary": primary,
- "creators": creators,
"releases": releases,
})
return hydro