mute SQLalchemy warnings
parent
9381763753
commit
b295af02f4
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue