[IMP] odoo: avoid useless error in logs
Avoid logging an error in the logs for an operation that is not an closes odoo/odoo#48957 Error: if the extension already exists, this is a success. X-original-commit: 2f884942c94a640ae5107ff2acb27ba4ecc60bc0 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
This commit is contained in:
+1
-1
@@ -115,7 +115,7 @@ def _create_empty_database(name):
|
||||
try:
|
||||
db = odoo.sql_db.db_connect(name)
|
||||
with closing(db.cursor()) as cr:
|
||||
cr.execute("CREATE EXTENSION unaccent")
|
||||
cr.execute("CREATE EXTENSION IF NOT EXISTS unaccent")
|
||||
cr.commit()
|
||||
except psycopg2.Error:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user