diff --git a/database.py b/database.py index 7d9f9faaffca0c6a5f6edf0fcc5e7529548036b6..296b07dbcdc9e82052796d7c088009fc8e99f3e1 100644 --- a/database.py +++ b/database.py @@ -43,12 +43,12 @@ class Person(Persisted): # Note that all of these conditions are written in terms of classes, OO fields, and Python operators, not tables, # DB fields, or SQL operators. reviewers = relationship('Person', uselist=True, secondary='reviewerships', - primaryjoin='Reviewership.reviewer_id == Person.person_id', - secondaryjoin='Reviewership.reviewee_id == Person.person_id', - back_populates='reviewees') - reviewees = relationship('Person', uselist=True, secondary='reviewerships', primaryjoin='Reviewership.reviewee_id == Person.person_id', secondaryjoin='Reviewership.reviewer_id == Person.person_id', + back_populates='reviewees') + reviewees = relationship('Person', uselist=True, secondary='reviewerships', + primaryjoin='Reviewership.reviewer_id == Person.person_id', + secondaryjoin='Reviewership.reviewee_id == Person.person_id', back_populates='reviewers') # If we want to be able to access the join table's pairs themselves, we write a standard one-to-many relationship # with extra information.