details: https://code.tryton.org/tryton/commit/c82640fd41bc
branch: 7.8
user: Cédric Krier <[email protected]>
date: Thu Sep 03 15:49:20 2026 +0200
description:
Use a sentinel as default value for setting attribute only if changed
For new instances, we must set also the attribute with value `None` as
they may
be tested later.
Closes #15060
(grafted from bfe3756af384f4fce94244761d5f5dd3f62d0ff6)
diffstat:
modules/web_shop_shopify/common.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (11 lines):
diff -r 5eafd0a40511 -r c82640fd41bc modules/web_shop_shopify/common.py
--- a/modules/web_shop_shopify/common.py Thu Aug 27 15:56:47 2026 +0200
+++ b/modules/web_shop_shopify/common.py Thu Sep 03 15:49:20 2026 +0200
@@ -187,6 +187,6 @@
def setattr_changed(record, name, value):
- if getattr(record, name, None) != value:
+ if getattr(record, name, object()) != value:
setattr(record, name, value)
return True