This commit is contained in:
2025-11-11 15:50:51 +01:00
parent edcf996d12
commit 6f34a0a4fa
3 changed files with 10 additions and 19 deletions
+5 -12
View File
@@ -1427,14 +1427,9 @@ impl<'a> DocumentsService<'a> {
});
if let Some(deleted_at) = document.deleted_at {
message.push_str(
". Note: the existing document is currently in the trash.",
);
message.push_str(". Note: the existing document is currently in the trash.");
if let Some(obj) = details.as_object_mut() {
obj.insert(
"conflict_document_in_trash".to_string(),
Value::Bool(true),
);
obj.insert("conflict_document_in_trash".to_string(), Value::Bool(true));
obj.insert(
"conflict_document_deleted_at".to_string(),
Value::String(to_iso(deleted_at)),
@@ -1442,11 +1437,9 @@ impl<'a> DocumentsService<'a> {
}
}
return Err(
AppError::conflict(message)
.with_code("duplicate_document")
.with_details(details),
);
return Err(AppError::conflict(message)
.with_code("duplicate_document")
.with_details(details));
}
if let Some(issued_at) = issued_at_override {