Skip to content

Commit

Permalink
🐛 cache mql field errors (#3191)
Browse files Browse the repository at this point in the history
* 🐛 store cached values in ms365 provider

Signed-off-by: Dominik Richter <[email protected]>

* 🧹 use res to ensure the state is properly set

---------

Signed-off-by: Dominik Richter <[email protected]>
Co-authored-by: Dominik Richter <[email protected]>
  • Loading branch information
chris-rock and arlimus authored Feb 2, 2024
1 parent 0f04f4b commit 8a04578
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions providers-sdk/v1/plugin/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ func GetOrCompute[T any](cached *TValue[T], compute func() (T, error)) *TValue[T
res := &TValue[T]{Data: x, Error: err}
if err != NotReady {
res.State = StateIsSet | StateIsNull
(*cached) = *res
}
return res
}
Expand Down

0 comments on commit 8a04578

Please sign in to comment.