From a187a73122c170936bf13975ddbe2a17e265fb2c Mon Sep 17 00:00:00 2001 From: spl0k Date: Sun, 28 Oct 2018 15:14:48 +0100 Subject: [PATCH] Commit right after registering a new client Closes #117 --- supysonic/api/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/supysonic/api/__init__.py b/supysonic/api/__init__.py index 3d52c93..9fc13c7 100644 --- a/supysonic/api/__init__.py +++ b/supysonic/api/__init__.py @@ -15,6 +15,7 @@ import uuid from flask import request from flask import Blueprint from pony.orm import ObjectNotFound +from pony.orm import commit from ..managers.user import UserManager from ..py23 import dict @@ -70,6 +71,7 @@ def get_client_prefs(): request.client = ClientPrefs[request.user, client] except ObjectNotFound: request.client = ClientPrefs(user = request.user, client_name = client) + commit() def get_entity(cls, param = 'id'): eid = request.values[param]