fix db error on second login

This commit is contained in:
2021-06-22 17:35:27 +02:00
parent b09b072261
commit 5d259635a2
4 changed files with 49 additions and 1 deletions

View File

@ -13,7 +13,7 @@ class User(db.Model):
auth_id = Column(String(50), nullable=False, unique=True)
profile_id = Column(Integer, ForeignKey("profile.id"), nullable=True)
tokens = relationship("Token", uselist=False, back_populates="user")
tokens = relationship("Token", back_populates="user")
profile = relationship("Profile", back_populates="user")
def to_dict(self):