Skip to content

Commit

Permalink
fix: ProposalSync state field
Browse files Browse the repository at this point in the history
  • Loading branch information
romever committed Oct 14, 2024
1 parent 2135a13 commit 5826bd2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions job/task/governance_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ func ProposalSync(ctx context.Context, svcCtx *svc.ServiceContext) {
return
}
if m != nil {
//update state
if proposal.State.String() != m.State {
m.State = proposal.State.String()
}
err = svcCtx.ProposalModel.Update(ctx, m)
if err != nil {
logc.Errorf(ctx, "Proposal [%d] update error, %v", proposal.ID, err)
return
}
continue
}

Expand Down

0 comments on commit 5826bd2

Please sign in to comment.