Permalink
Browse files

Merge pull request #184 from benhoyt/patch-1

Fix unhelpful "Bad data" error message (issue 183)
  • Loading branch information...
2 parents 736ce8d + 8ad8dbe commit 7a56082667c139278d76985e4d54bbb76054c4b8 @aaronsw aaronsw committed Oct 4, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 web/db.py
View
@@ -815,10 +815,9 @@ def multiple_insert(self, tablename, values, seqname=None, _test=False):
keys = values[0].keys()
#@@ make sure all keys are valid
- # make sure all rows have same keys.
for v in values:
if v.keys() != keys:
- raise ValueError, 'Bad data'
+ raise ValueError, 'Not all rows have the same keys'
sql_query = SQLQuery('INSERT INTO %s (%s) VALUES ' % (tablename, ', '.join(keys)))

0 comments on commit 7a56082

Please sign in to comment.