Moved query wrong field test to lib.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2m45s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2m45s
This commit is contained in:
@@ -594,7 +594,11 @@ impl DocumentFile {
|
||||
for (field, data) in query.iter() {
|
||||
let id = match self.docdef.get_field_id(field) {
|
||||
Ok(fid) => fid,
|
||||
Err(err) => return Err(err),
|
||||
Err(mut err) => {
|
||||
err.add_parent(ErrorID::Field(field.clone()));
|
||||
err.add_parent(ErrorID::Document(query.doc_name().clone()));
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
if indexed_ids.contains(&id) {
|
||||
indexed.insert(id, data.clone());
|
||||
@@ -1449,7 +1453,6 @@ mod document_files {
|
||||
_ => unreachable!("got {:?}: should have been a reply", action),
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[test]
|
||||
fn errors_on_bad_field_name() {
|
||||
@@ -1475,6 +1478,7 @@ mod document_files {
|
||||
_ => unreachable!("got {:?}: should have been a error", action),
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#[test]
|
||||
fn errors_on_bad_field_type_with_index() {
|
||||
|
||||
Reference in New Issue
Block a user