Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix unhelpful "Bad data" error message (issue 183) #184

Merged
merged 1 commit into from

2 participants

@benhoyt

Fixes unhelpful "Bad data" error message as per issue 183.

@benhoyt benhoyt Fix issue 183 as a pull request
Fixes unhelpful "Bad data" error message as per [issue 183](webpy#183).
8ad8dbe
@aaronsw aaronsw merged commit 7a56082 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 4, 2012
  1. @benhoyt

    Fix issue 183 as a pull request

    benhoyt authored
    Fixes unhelpful "Bad data" error message as per [issue 183](webpy#183).
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 2 deletions.
  1. +1 −2  web/db.py
View
3  web/db.py
@@ -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)))
Something went wrong with that request. Please try again.