Skip to content
Permalink
Browse files

Merge pull request #71 from jkleint/call-log-fix

Quick fix for CallLog.to_dict() KeyErrors
  • Loading branch information...
claesenm committed Dec 14, 2016
2 parents bcc6f0f + a37d4dc commit 019182ca83fe2002083cc1ac938510cb967fd2c9
Showing with 2 additions and 2 deletions.
  1. +2 −2 optunity/functions.py
@@ -225,13 +225,13 @@ def to_dict(self):
"""
if self.data:
args = dict([(k, []) for k in list(self.keys())[0].keys()])
args = collections.defaultdict(list)
values = []
for k, v in self.data.items():
for key, value in k:
args[key].append(value)
values.append(v)
return {'args': args, 'values': values}
return {'args': dict(args), 'values': values}
else:
return {'args': {}, 'values': []}

0 comments on commit 019182c

Please sign in to comment.
You can’t perform that action at this time.