[FIX] small changes

(lp:c2c-addons/6.1  rev 89.1.23)
This commit is contained in:
Guewen Baconnier @ Camptocamp
2012-10-25 13:36:40 +02:00
parent 019198990d
commit 92f1440b8d
3 changed files with 5 additions and 3 deletions

View File

@@ -155,7 +155,8 @@ class CreditControlRun(Model):
Lock the ``credit_control_run`` Postgres table to avoid concurrent
calls of this method.
"""
context = context or {}
if context is None:
context = {}
try:
cursor.execute('SELECT id FROM credit_control_run'
' LIMIT 1 FOR UPDATE NOWAIT' )