details:   https://code.tryton.org/tryton/commit/02082bc9ac46
branch:    default
user:      Cédric Krier <[email protected]>
date:      Wed Sep 24 09:27:26 2025 +0200
description:
        Remove unnecessary __bool__ implementation on Model

        In standard Python already consider object as True if they do not 
implement
        __bool__ nor __len__.
diffstat:

 trytond/trytond/model/model.py |  3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diffs (13 lines):

diff -r 5c14f47fe215 -r 02082bc9ac46 trytond/trytond/model/model.py
--- a/trytond/trytond/model/model.py    Wed Sep 24 09:25:49 2025 +0200
+++ b/trytond/trytond/model/model.py    Wed Sep 24 09:27:26 2025 +0200
@@ -385,9 +385,6 @@
     def __hash__(self):
         return hash((self.__name__, id(self) if self.id is None else self.id))
 
-    def __bool__(self):
-        return True
-
     @property
     def _default_values(self):
         """Return the values not stored.

Reply via email to