Merge lp:~dorian-kemps/unifield-server/US-10141 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 6263
Proposed branch: lp:~dorian-kemps/unifield-server/US-10141
Merge into: lp:unifield-server
Diff against target: 42 lines (+9/-5)
2 files modified
bin/service/security.py (+8/-4)
bin/service/web_services.py (+1/-1)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-10141
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+425387@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/service/security.py'
--- bin/service/security.py 2021-02-05 15:05:10 +0000
+++ bin/service/security.py 2022-06-28 10:18:28 +0000
@@ -27,6 +27,7 @@
27from passlib.hash import bcrypt27from passlib.hash import bcrypt
28from tools.translate import _28from tools.translate import _
29from osv import osv29from osv import osv
30from psycopg2._psycopg import ProgrammingError
30PASSWORD_MIN_LENGHT = 831PASSWORD_MIN_LENGHT = 8
3132
32# When rejecting a password, hide the traceback33# When rejecting a password, hide the traceback
@@ -49,10 +50,13 @@
49 if pooler.pool_dic[cr.dbname]._ready:50 if pooler.pool_dic[cr.dbname]._ready:
50 return False51 return False
51 ready = False52 ready = False
52 cr.execute("select count(id) from ir_module_module where state in ('to install', 'to upgrade')")53 try:
53 n = cr.fetchone()54 cr.execute("select count(id) from ir_module_module where state in ('to install', 'to upgrade')")
54 if n and n[0]:55 n = cr.fetchone()
55 return n[0]56 if n and n[0]:
57 return n[0]
58 except ProgrammingError:
59 raise Exception("BadRestoration: The table ir_module_module is missing")
56 if not ready:60 if not ready:
57 # when loading the trans. modules are installed but db is not ready61 # when loading the trans. modules are installed but db is not ready
58 return True62 return True
5963
=== modified file 'bin/service/web_services.py'
--- bin/service/web_services.py 2020-03-10 13:14:15 +0000
+++ bin/service/web_services.py 2022-06-28 10:18:28 +0000
@@ -364,7 +364,7 @@
364364
365 self._create_empty_database(db_name)365 self._create_empty_database(db_name)
366366
367 cmd = ['pg_restore', '--no-owner', '--no-acl', '-n', 'public']367 cmd = ['pg_restore', '--no-owner', '--no-acl', '-n', 'public', '--single-transaction']
368 if tools.config['db_user']:368 if tools.config['db_user']:
369 cmd.append('--username=' + tools.config['db_user'])369 cmd.append('--username=' + tools.config['db_user'])
370 if tools.config['db_host']:370 if tools.config['db_host']:

Subscribers

People subscribed via source and target branches