Commit 5efbb369 authored by Hamza Dely's avatar Hamza Dely
Browse files

[quota] Place luser en dehors du contexte try/except

parent 7a24d578
......@@ -62,10 +62,10 @@ def affquotas(request):
connect_dict['port'] = int(port)
connect_dict['host'] = host
luser = conn_pool.get_user(request.user)
try:
con = psycopg2.connect(**connect_dict)
cur = con.cursor()
luser = conn_pool.get_user(request.user)
u_type, u_id = luser.dn.split(',', 1)[0].split('=')
u_type = {'aid': 'adherent', 'cid': 'club'}[u_type]
u_id = int(u_id)
......
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