This commit is contained in:
Aevann1 2021-09-21 23:27:32 +02:00
parent 67e4c1fe5e
commit a7a555cabd
12 changed files with 55 additions and 55 deletions

View file

@ -17,7 +17,7 @@ class OauthApp(Base):
redirect_uri = Column(String(4096))
description = Column(String(256))
author_id = Column(Integer, ForeignKey("users.id"))
author = relationship("User", viewonly=True)
author = relationship("User")
def __repr__(self): return f"<OauthApp(id={self.id})>"
@ -68,8 +68,8 @@ class ClientAuth(Base):
oauth_client = Column(Integer, ForeignKey("oauth_apps.id"))
access_token = Column(String(128))
user_id = Column(Integer, ForeignKey("users.id"))
user = relationship("User", lazy="joined", viewonly=True)
application = relationship("OauthApp", lazy="joined", viewonly=True)
user = relationship("User", lazy="joined")
application = relationship("OauthApp", lazy="joined")
@property
@lazy