From 405da33172bbfc717aeb3681c6cecaa4784c4b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 19 Aug 2021 22:25:24 +0200 Subject: [PATCH] Do not use authorisation for repr if it is None issue10642 review342871005 (grafted from c9801860af620cbfe413c158a6a8c33ae3fb3d69) --HG-- branch : 6.0 --- trytond/protocols/wrappers.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/trytond/protocols/wrappers.py b/trytond/protocols/wrappers.py index 10b8cfee51..86aed0d654 100644 --- a/trytond/protocols/wrappers.py +++ b/trytond/protocols/wrappers.py @@ -38,8 +38,11 @@ class Request(_Request): else: url = self.url.decode(self.url_charset) auth = self.authorization - args.append("%s@%s" % ( - auth.get('userid', auth.username), self.remote_addr)) + if auth: + args.append("%s@%s" % ( + auth.get('userid', auth.username), self.remote_addr)) + else: + args.append(self.remote_addr) args.append("'%s'" % url) args.append("[%s]" % self.method) args.append("%s" % (self.rpc_method or ''))