1
0
Fork 0

fix invalid assertion (#10428)

This commit is contained in:
Jan 2019-11-14 10:21:16 +01:00 committed by KVS85
parent 1f41dbd256
commit a17ec21767
1 changed files with 3 additions and 3 deletions

View File

@ -1826,8 +1826,8 @@ OperationResult transaction::Methods::insertLocal(std::string const& collectionN
if (res.fail()) {
// Error reporting in the babies case is done outside of here,
if (res.is(TRI_ERROR_ARANGO_CONFLICT) && !isBabies) {
TRI_ASSERT(prevDocResult.revisionId() != 0);
if (res.is(TRI_ERROR_ARANGO_CONFLICT) && !isBabies && prevDocResult.revisionId() != 0) {
TRI_ASSERT(didReplace);
arangodb::velocypack::StringRef key = value.get(StaticStrings::KeyString).stringRef();
buildDocumentIdentity(collection, resultBuilder, cid, key, prevDocResult.revisionId(),
@ -1837,7 +1837,7 @@ OperationResult transaction::Methods::insertLocal(std::string const& collectionN
}
if (!options.silent) {
const bool showReplaced = (options.returnOld && didReplace);
bool const showReplaced = (options.returnOld && didReplace);
TRI_ASSERT(!options.returnNew || !docResult.empty());
TRI_ASSERT(!showReplaced || !prevDocResult.empty());