From 436503e1f4fd1a22422ab729c757e1fd3d220e81 Mon Sep 17 00:00:00 2001 From: Stanislas Sobieski Date: Tue, 11 Jul 2023 12:15:58 +0000 Subject: [PATCH] [IMP] core: readable representation of the cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the cache is filled with binary field, it can fill the logs with unreadable and (probably) non compressible data closes odoo/odoo#130741 X-original-commit: 6afba8fafe79dcf9bc28710a7edbd33b6a5b459f Signed-off-by: Rémy Voet (ryv) --- odoo/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odoo/api.py b/odoo/api.py index 3f4f72e73f1..121427c2849 100644 --- a/odoo/api.py +++ b/odoo/api.py @@ -905,14 +905,14 @@ class Cache(object): if field_cache and isinstance(next(iter(field_cache)), tuple): data[field] = { key: { - Starred(id_) if id_ in dirty_ids else id_: val + Starred(id_) if id_ in dirty_ids else id_: val if field.type != 'binary' else '' for id_, val in key_cache.items() } for key, key_cache in field_cache.items() } else: data[field] = { - Starred(id_) if id_ in dirty_ids else id_: val + Starred(id_) if id_ in dirty_ids else id_: val if field.type != 'binary' else '' for id_, val in field_cache.items() } return repr(data)