Skip to content

Commit

Permalink
its: Fixed IssueRepository::save
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Feb 7, 2022
1 parent 2771f9a commit 3265b74
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ impl IssueRepository for SqliteIssueRepository {
let version = event.version();
EventStore::save(
&mut transaction,
None, // FIXME
version.prev().map(|version| {
u32::try_from(u64::from(version))
.map(AggregateVersion::from)
.map_err(|_| RepositoryError::IO)
.expect("parse aggregate version")
}),
Event {
aggregate_id,
data: serde_json::to_string(&EventDto::from(event))
Expand Down

0 comments on commit 3265b74

Please sign in to comment.