summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ausbutler/model.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ausbutler/model.py b/ausbutler/model.py
index 79784bf..356ef9b 100644
--- a/ausbutler/model.py
+++ b/ausbutler/model.py
@@ -28,7 +28,7 @@ class Player(Base):
class AusButler(Base):
__tablename__ = 'aus_butler'
- id = Column(Integer, ForeignKey(Player.id), primary_key=True)
+ id = Column(Integer, primary_key=True)
match = Column(Integer, primary_key=True)
segment = Column(Integer, primary_key=True)
score = Column(Float)
@@ -36,7 +36,7 @@ class AusButler(Base):
opp_score = Column(Float)
corrected_score = Column(Float)
board_count = Column(Integer)
- player = relationship('Player', uselist=False)
+ player = relationship('Player', uselist=False, foreign_keys=[id], primaryjoin='AusButler.id == Player.id')
@cached_property
def table(self):