fdsfs
This commit is contained in:
parent
67e4c1fe5e
commit
a7a555cabd
12 changed files with 55 additions and 55 deletions
|
@ -9,7 +9,7 @@ class Subscription(Base):
|
|||
user_id = Column(BigInteger, ForeignKey("users.id"))
|
||||
submission_id = Column(BigInteger, default=0)
|
||||
|
||||
user = relationship("User", uselist=False, viewonly=True)
|
||||
user = relationship("User", uselist=False)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
@ -24,8 +24,8 @@ class Follow(Base):
|
|||
user_id = Column(BigInteger, ForeignKey("users.id"))
|
||||
target_id = Column(BigInteger, ForeignKey("users.id"))
|
||||
|
||||
user = relationship("User", uselist=False, primaryjoin="User.id==Follow.user_id", viewonly=True)
|
||||
target = relationship("User", lazy="joined", primaryjoin="User.id==Follow.target_id", viewonly=True)
|
||||
user = relationship("User", uselist=False, primaryjoin="User.id==Follow.user_id")
|
||||
target = relationship("User", lazy="joined", primaryjoin="User.id==Follow.target_id")
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue