Permalink
Browse files

Fix issue 183 as a pull request

Fixes unhelpful "Bad data" error message as per [issue 183](#183).
  • Loading branch information...
1 parent 736ce8d commit 8ad8dbe3088c54995ab2780890c5e2fedaa63034 @benhoyt benhoyt 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 8ad8dbe

Please sign in to comment.