|
@@ -222,16 +222,16 @@ impl Transaction {
|
|
created_at: Utc::now(),
|
|
created_at: Utc::now(),
|
|
};
|
|
};
|
|
let revision_id = new_revision.rev_id()?;
|
|
let revision_id = new_revision.rev_id()?;
|
|
|
|
+ let mut revisions = self.revisions;
|
|
|
|
+ revisions.push(revision_id.clone());
|
|
|
|
|
|
- let mut new_transaction = Transaction {
|
|
|
|
|
|
+ Ok(Transaction {
|
|
id: self.id,
|
|
id: self.id,
|
|
- revisions: self.revisions,
|
|
|
|
- revision_id: revision_id.clone(),
|
|
|
|
|
|
+ revisions,
|
|
|
|
+ revision_id,
|
|
transaction: self.transaction,
|
|
transaction: self.transaction,
|
|
revision: new_revision,
|
|
revision: new_revision,
|
|
- };
|
|
|
|
- new_transaction.revisions.push(revision_id);
|
|
|
|
- Ok(new_transaction)
|
|
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
/// Validates the transaction and its revisions
|
|
/// Validates the transaction and its revisions
|