1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-12-22 08:56:17 +00:00

Commit right after registering a new client

Closes #117
This commit is contained in:
spl0k 2018-10-28 15:14:48 +01:00
parent fd5d53f253
commit a187a73122

View File

@ -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]