details:   https://code.tryton.org/tryton/commit/d51a5bb97746
branch:    default
user:      Cédric Krier <[email protected]>
date:      Mon Dec 15 17:11:51 2025 +0100
description:
        Log exception when retrieve file ID from the filestore for Binary field
diffstat:

 trytond/trytond/model/fields/binary.py |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 619fd425e3bb -r d51a5bb97746 trytond/trytond/model/fields/binary.py
--- a/trytond/trytond/model/fields/binary.py    Fri Dec 19 09:39:32 2025 +0100
+++ b/trytond/trytond/model/fields/binary.py    Mon Dec 15 17:11:51 2025 +0100
@@ -1,5 +1,8 @@
 # This file is part of Tryton.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
+
+import logging
+
 from sql import Column, Null
 
 from trytond.filestore import filestore
@@ -8,6 +11,8 @@
 
 from .field import Field
 
+logger = logging.getLogger(__name__)
+
 
 def caster(d):
     if isinstance(d, bytes):
@@ -88,7 +93,9 @@
                     try:
                         res[record_id] = store_func(file_id, prefix)
                     except (IOError, OSError):
-                        pass
+                        logger.exception(
+                            "failed to retrieve %r from filestore at %r",
+                            file_id, prefix)
 
         for i in values:
             if i['id'] in res:

Reply via email to