mute SQLalchemy warnings

remotes/1693045480750635534/spooky-22
Aevann1 2022-09-03 21:28:49 +02:00
parent 9381763753
commit b295af02f4
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ class HatDef(Base):
author_id = Column(Integer, ForeignKey('users.id'))
price = Column(Integer)
author = relationship("User", primaryjoin="HatDef.author_id == User.id")
author = relationship("User", primaryjoin="HatDef.author_id == User.id", back_populates="designed_hats")
@property
@lazy

View File

@ -153,7 +153,7 @@ class User(Base):
awards = relationship("AwardRelationship", primaryjoin="User.id==AwardRelationship.user_id", back_populates="user")
referrals = relationship("User")
equipped_hat = relationship("HatDef", primaryjoin="User.equipped_hat_id==HatDef.id")
designed_hats = relationship("HatDef", primaryjoin="User.id==HatDef.author_id")
designed_hats = relationship("HatDef", primaryjoin="User.id==HatDef.author_id", back_populates="author")
owned_hats = relationship("Hat")
def __init__(self, **kwargs):