Revision 89ce4acc
b/lib/query.py | ||
---|---|---|
154 | 154 |
for (idx, row) in enumerate(result): |
155 | 155 |
assert _VerifyResultRow(self._fields, row), \ |
156 | 156 |
("Inconsistent result for fields %s in row %s: %r" % |
157 |
(self._fields, idx, row))
|
|
157 |
(GetAllFields(self._fields), idx, row))
|
|
158 | 158 |
|
159 | 159 |
return result |
160 | 160 |
|
... | ... | |
205 | 205 |
@return: Field dictionary for L{Query} |
206 | 206 |
|
207 | 207 |
""" |
208 |
assert len(set(fdef.title.lower() |
|
209 |
for (fdef, _, _) in fields)) == len(fields), \ |
|
210 |
"Duplicate title found" |
|
208 |
if __debug__: |
|
209 |
duplicates = utils.FindDuplicates(fdef.title.lower() |
|
210 |
for (fdef, _, _) in fields) |
|
211 |
assert not duplicates, "Duplicate title(s) found: %r" % duplicates |
|
211 | 212 |
|
212 | 213 |
result = {} |
213 | 214 |
|
... | ... | |
218 | 219 |
assert FIELD_NAME_RE.match(fdef.name) |
219 | 220 |
assert TITLE_RE.match(fdef.title) |
220 | 221 |
assert callable(fn) |
221 |
assert fdef.name not in result, "Duplicate field name found" |
|
222 |
assert fdef.name not in result, \ |
|
223 |
"Duplicate field name '%s' found" % fdef.name |
|
222 | 224 |
|
223 | 225 |
result[fdef.name] = field |
224 | 226 |
|
Also available in: Unified diff