attempt at bugfix for integrityerror, but hard to test
Merge pull request #15 from WattTime/currentset_bugfix

attempt at bugfix for integrityerror, but hard to test