Skip to content

Commit

Permalink
pr suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
SimoneDutto committed Dec 9, 2024
1 parent 7400a84 commit 3115198
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/jimm/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -1174,8 +1174,8 @@ func (j *JIMM) DestroyModel(ctx context.Context, user *openfga.User, mt names.Mo
zapctx.Error(ctx, "failed to call destroy juju api", zaputil.Error(err))
// this is a manual way of restoring the life state to alive if the JUJU api fails.
m.Life = state.Alive.String()
if err := j.Database.UpdateModel(ctx, m); err != nil {
zapctx.Error(ctx, "failed to store model change", zaputil.Error(err))
if uerr := j.Database.UpdateModel(ctx, m); uerr != nil {
zapctx.Error(ctx, "failed to store model change", zaputil.Error(uerr))
}
return err
}
Expand Down

0 comments on commit 3115198

Please sign in to comment.