From dd217922f35f5b854692fb403eed343a941e0221 Mon Sep 17 00:00:00 2001 From: Rudy Fraser Date: Sun, 22 Sep 2024 17:49:54 -0400 Subject: [PATCH] Fix issue with swap commits due to update_write_to_op() returning RecordWriteOp::Create instead of RecordWriteOp::Update --- rsky-pds/src/repo/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsky-pds/src/repo/types.rs b/rsky-pds/src/repo/types.rs index 9cf6ef9..566642d 100644 --- a/rsky-pds/src/repo/types.rs +++ b/rsky-pds/src/repo/types.rs @@ -196,7 +196,7 @@ pub fn create_write_to_op(write: PreparedCreateOrUpdate) -> RecordWriteOp { pub fn update_write_to_op(write: PreparedCreateOrUpdate) -> RecordWriteOp { let uri_without_prefix = write.uri.replace("at://", ""); let parts = uri_without_prefix.split("/").collect::>(); - RecordWriteOp::Create { + RecordWriteOp::Update { 0: RecordCreateOrUpdateOp { action: WriteOpAction::Update, collection: parts[1].to_string(),