Skip to content

Commit

Permalink
Merge pull request #32 from jribnik/master
Browse files Browse the repository at this point in the history
Initialize reduce in getRecordTypes in case it's given an empty sequence
  • Loading branch information
ellieayla authored Aug 23, 2016
2 parents c0362cb + af092b7 commit 95d31b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changelog
=========

1.7.3 (2016-08-22)
Bugfix: initialize value of reduce in getRecordTypes

1.7.2 (2015-12-21)
Upgraded xmltramp to 2.18 with some inline patching.
Experimenting with Travis-CI integration.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup

setup(name='pyforce',
version='1.7.2', # be sure to update the version in pyforce.py too
version='1.7.3', # be sure to update the version in pyforce.py too
package_dir={'': 'src'},
packages=['pyforce'],
author = "Simon Fell et al. reluctantly Forked by idbentley",
Expand Down
2 changes: 1 addition & 1 deletion src/pyforce/pyforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,5 +721,5 @@ def getRecordTypes(xml):
elif isQueryResult(field):
record_types.update(reduce(lambda x, y: x | y, [
getRecordTypes(r) for r in
field[_tPartnerNS.records,]]))
field[_tPartnerNS.records,]], set()))
return record_types

0 comments on commit 95d31b4

Please sign in to comment.