diff --git a/mwdb/resources/oauth.py b/mwdb/resources/oauth.py index f5227945..bade1b6e 100644 --- a/mwdb/resources/oauth.py +++ b/mwdb/resources/oauth.py @@ -132,8 +132,8 @@ def post(self): db.session.flush() db.session.refresh(group) - provider.group_id = group.id - db.session.add(provider) + provider_settings.group_id = group.id + db.session.add(provider_settings) db.session.commit() hooks.on_created_group(group)