Skip to content

Commit

Permalink
fixed sqlstore
Browse files Browse the repository at this point in the history
  • Loading branch information
kopaygorodsky committed May 29, 2021
1 parent aeff8f5 commit a74af46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions saga/sagainst.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,8 @@ func (s *sagaInstance) update() {

func (s *sagaInstance) AddHistoryEvent(ev message.Object, opts ...AddEvOpt) {
attachOpts := &addEvOpts{}
if len(opts) > 0 {
for _, o := range opts {
o(attachOpts)
}
for _, o := range opts {
o(attachOpts)
}

historyEv := HistoryEvent{
Expand Down
2 changes: 1 addition & 1 deletion saga/sqlstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (s sqlStore) Update(ctx context.Context, sagaInstance Instance) error {

if len(eventsIDs) < len(sagaInstance.HistoryEvents()) {
for _, ev := range sagaInstance.HistoryEvents() {
if _, exists := eventsIDs[ev.UID]; !exists {
if _, exists := eventsIDs[ev.UID]; exists {
continue
}

Expand Down

0 comments on commit a74af46

Please sign in to comment.