Commit 2c1e3b22 authored by Matthieu Lamalle's avatar Matthieu Lamalle
Browse files

corrections

parent 968e9453
......@@ -3,6 +3,5 @@
BEGIN;
DROP SCHEMA server CASCADE;
DROP SCHEMA serverselection CASCADE;
COMMIT;
......@@ -2,4 +2,3 @@
%project=server
server_schema 2017-10-09T09:31:30Z Equipe EOLE <eole@ac-dijon.fr> # Definition du schema de base pour le domaine Server
serverselection_schema 2017-10-09T09:31:30Z Equipe EOLE <eole@ac-dijon.fr> # Definition du schema de base pour le domaine Serverselection
......@@ -106,7 +106,7 @@ class ServerRunner(ZephirCommonController):
secretkey="{}_passphrase".format(result['serverid']),
secret={"passphrase" : serverpassphrase})
if return_code:
defaultserverselection = self.serverselection.default_user_serverselection(cursor, _session_user['username'] )
defaultserverselection = self._default_user_serverselection(cursor, _session_user)
self.serverselection.add_server_to_selection(cursor, result['serverid'], defaultserverselection['serverselectionid'])
return result
else:
......@@ -335,6 +335,9 @@ class ServerRunner(ZephirCommonController):
@register_wamp('v1.serverselection.user.default', notification_uri=None, database=True)
async def default_user_serverselection(self, cursor, _session_user):
return self._default_user_serverselection(cursor, _session_user)
def _default_user_serverselection(self, cursor, _session_user):
try:
serverselectionuser = _session_user['username']
return self.serverselection.default_user_serverselection(cursor, serverselectionuser)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment