changeset 3a1b5de38374 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset&node=3a1b5de38374
description:
Use __str__ of record for warning key
This format is common with proteus.
issue10672
review359941002
diffstat:
trytond/res/user.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (14 lines):
diff -r e82d64fcd8f0 -r 3a1b5de38374 trytond/res/user.py
--- a/trytond/res/user.py Sat Sep 04 19:40:33 2021 +0200
+++ b/trytond/res/user.py Sat Sep 04 19:44:08 2021 +0200
@@ -1032,8 +1032,8 @@
@classmethod
def format(cls, name, records):
- return '%s.%s' % (
- hashlib.md5(str(records).encode('utf-8')).hexdigest(), name)
+ key = '|'.join(map(str, records)).encode('utf-8')
+ return '%s.%s' % (hashlib.md5(key).hexdigest(), name)
@classmethod
def check(cls, warning_name):