Working on upgrade to 0.11.... from a _state_handl...
# prefect-community
d
Working on upgrade to 0.11.... from a _state_handler_ invocation, we need to access the return value of write() method on a custom ResultHandler (now wrapped inside a ResultHandlerResult instance as I understand it). The state handler receives a _new_state_ instance, but as I read it there's a getter on State.result that gives back a scalar value rather than the result instance from which I might access location attribute where result_handler.write() retval appears to be stored. What is the right way to access this?
c
Hi Dan - you can find the full result instance at state._result
(Note the underscore)
d
Thanks Chris. We were doing
new_state._result.safe_value.value
previously, but that seemed to break with 0.11. I will revisit that.
c
Ah gotcha so the new “safe value” is now state._result.location
d
Awesome, was just going to try that - thank you!
🎯
c
💯