Only check fields if the document is a table record
This commit is contained in:
parent
cd5ec21164
commit
8e283ecaeb
1 changed files with 21 additions and 18 deletions
|
@ -112,6 +112,8 @@ impl<'a> Document<'a> {
|
||||||
_ => Err(Error::Ignore),
|
_ => Err(Error::Ignore),
|
||||||
},
|
},
|
||||||
}?;
|
}?;
|
||||||
|
// Check if this record exists
|
||||||
|
if self.id.is_some() {
|
||||||
// Loop through all field statements
|
// Loop through all field statements
|
||||||
for fd in self.fd(opt, txn).await?.iter() {
|
for fd in self.fd(opt, txn).await?.iter() {
|
||||||
// Loop over each field in document
|
// Loop over each field in document
|
||||||
|
@ -135,6 +137,7 @@ impl<'a> Document<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Output result
|
// Output result
|
||||||
Ok(out)
|
Ok(out)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue