changeset 4762296c56c4 in modules/stock_package_shipping_dpd:5.0
details:
https://hg.tryton.org/modules/stock_package_shipping_dpd?cmd=changeset&node=4762296c56c4
description:
Do not truncate email address
If the address is too long, we must not fill it.
issue11237
review387901002
(grafted from f1b43df4a83d7316d098b7d7c09fc9b3ae5d6c1a)
diffstat:
stock.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (14 lines):
diff -r c7cbc698f72b -r 4762296c56c4 stock.py
--- a/stock.py Sat Jan 01 18:05:50 2022 +0100
+++ b/stock.py Thu Feb 17 00:39:44 2022 +0100
@@ -195,8 +195,8 @@
email = mechanism.value
if phone:
shipping_party['phone'] = phone[:30]
- if email:
- shipping_party['email'] = email[:50]
+ if len(email) <= 50:
+ shipping_party['email'] = email
return shipping_party