mirror of
https://github.com/kennethreitz/records.git
synced 2026-06-05 23:00:20 +00:00
More helpful error message for RecordCollection.one
This commit is contained in:
+3
-1
@@ -243,7 +243,9 @@ class RecordCollection(object):
|
||||
except IndexError:
|
||||
pass
|
||||
else:
|
||||
raise ValueError('RecordCollection contains too many rows.')
|
||||
raise ValueError('RecordCollection contained more than one row. '
|
||||
'Expects only one row when using '
|
||||
'RecordCollection.one')
|
||||
|
||||
# Cast and return.
|
||||
if as_dict:
|
||||
|
||||
Reference in New Issue
Block a user