summaryrefslogtreecommitdiff
path: root/src/leap/mail/adaptors/models.py
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2015-08-11 13:42:24 +0200
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-08-11 13:42:24 +0200
commit490effb589ad94f2f6f520b385399864b08def91 (patch)
tree851b72f12ed027b5f09a2ac05c3ac5b5271630b4 /src/leap/mail/adaptors/models.py
parent68fdc62d4c2792fb7fdea90f1117cf6c6f1c5ffc (diff)
[bug] Fix missing _normailize_dict in DocumentWrapper constructor.
In the constructor values already is normalized (i.e. with underscores), while kwargs contains items that are not normalized (i.e. with dashes). Joining the dicts resulted in two entries that only differed by dash or underscores. The setattr then set the value that occurred later in items, thereby sometimes overriding the correct value with the default one.
Diffstat (limited to 'src/leap/mail/adaptors/models.py')
-rw-r--r--src/leap/mail/adaptors/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/leap/mail/adaptors/models.py b/src/leap/mail/adaptors/models.py
index 2bf9e60..49460f7 100644
--- a/src/leap/mail/adaptors/models.py
+++ b/src/leap/mail/adaptors/models.py
@@ -76,7 +76,7 @@ class DocumentWrapper(object):
if kwargs:
values = copy.deepcopy(defaults)
- values.update(kwargs)
+ values.update(_normalize_dict(kwargs))
else:
values = defaults