summaryrefslogtreecommitdiffstats
path: root/gitsrht/app.py
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-12-28 20:01:53 -0500
committerDrew DeVault <sir@cmpwn.com>2018-12-28 20:01:53 -0500
commitdb6bcc2c7e9d8fcf1c9fea129ae0ad8b15730cba (patch)
tree4269ba4df317b55d6b00a14f383212252749dcee /gitsrht/app.py
parentb2f98eaee1bfef16bc47c7cbb82619c717057923 (diff)
Fix user_type setup on login
Diffstat (limited to 'gitsrht/app.py')
-rw-r--r--gitsrht/app.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gitsrht/app.py b/gitsrht/app.py
index f8a4511..7efc3d6 100644
--- a/gitsrht/app.py
+++ b/gitsrht/app.py
@@ -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