From c43e19c3ebccb20c1691f7e48ace50f4591d38ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 6 Oct 2012 15:04:01 +0200 Subject: [PATCH] Fix naming collision in get_shares --- trytond/webdav/webdav.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trytond/webdav/webdav.py b/trytond/webdav/webdav.py index f02b7531b8..24663e46bd 100644 --- a/trytond/webdav/webdav.py +++ b/trytond/webdav/webdav.py @@ -771,15 +771,15 @@ class Attachment(ModelSQL, ModelView): @classmethod def get_shares(cls, attachments, name): Share = Pool().get('webdav.share') - shares = dict((a.id, []) for a in attachments) + result = dict((a.id, []) for a in attachments) path2attachement = dict((a.path, a) for a in attachments) shares = Share.search([ ('path', 'in', path2attachement.keys()), ]) for share in shares: attachment = path2attachement[share.path] - shares[attachment.id].append(share.id) - return shares + result[attachment.id].append(share.id) + return result @classmethod def set_shares(cls, attachments, name, value):