From 4b5467fb280d03ae2394588531f4494f1c6258cb Mon Sep 17 00:00:00 2001 From: Matthieu Dietrich Date: Fri, 17 Oct 2014 15:41:07 +0200 Subject: [PATCH] Replace by compact form (PEP8-compatible) --- account_easy_reconcile/easy_reconcile.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/account_easy_reconcile/easy_reconcile.py b/account_easy_reconcile/easy_reconcile.py index c2c0cb93..ae1b9009 100644 --- a/account_easy_reconcile/easy_reconcile.py +++ b/account_easy_reconcile/easy_reconcile.py @@ -171,10 +171,8 @@ class AccountEasyReconcile(orm.Model): cr, uid, [('easy_reconcile_id', '=', reconcile_id)], limit=1, order='date desc' ) - if len(last_history) > 0: - result[reconcile_id] = last_history[0] - else: - result[reconcile_id] = False + result[reconcile_id] = len(last_history) \ + and last_history[0] or False return result _columns = {