mirror of
https://github.com/gmbrax/Pilgrim.git
synced 2026-11-10 01:20:16 +00:00
Fix the photo and travel diary relationship to properly work
This commit is contained in:
parent
d840299398
commit
83e7db9ce1
@@ -25,7 +25,8 @@ class Photo(Base):
|
||||
back_populates="photos"
|
||||
)
|
||||
|
||||
fk_travel_diary_id = Column(Integer, ForeignKey("travel_diaries.id"),nullable=False)
|
||||
fk_travel_diary_id = Column(Integer, ForeignKey("travel_diaries.id"), nullable=False)
|
||||
travel_diary = relationship("TravelDiary", back_populates="photos")
|
||||
__table_args__ = (
|
||||
Index('idx_photo_hash_diary', 'hash', 'fk_travel_diary_id'),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user