details: https://code.tryton.org/tryton/commit/bfe3756af384
branch: default
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
diffstat:
modules/web_shop_shopify/common.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (11 lines):
diff -r 5eae02e6c094 -r bfe3756af384 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
@@ -188,6 +188,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