~edwargix/git.sr.ht

db6bcc2c7e9d8fcf1c9fea129ae0ad8b15730cba — Drew DeVault 7 years ago b2f98ea
Fix user_type setup on login
1 files changed, 2 insertions(+), 2 deletions(-)

M gitsrht/app.py
M gitsrht/app.py => gitsrht/app.py +2 -2
@@ 9,7 9,7 @@ from srht.database import DbSession

db = DbSession(cfg("git.sr.ht", "connection-string"))

from gitsrht.types import User
from gitsrht.types import User, UserType

db.init()



@@ 77,7 77,7 @@ class GitApp(SrhtFlask):
            db.session.add(user)
        user.username = profile["name"]
        user.email = profile["email"]
        user.user_type = profile["user_type"]
        user.user_type = UserType(profile["user_type"])
        user.oauth_token = exchange["token"]
        user.oauth_token_expires = exchange["expires"]
        user.oauth_token_scopes = scopes