@hube2 That works.
Also I think I actually fixed the issue by correcting a typo that isn’t included in my code sample above. So this can be closed as “solved”.
But I am still curious: do you know why update_field() would return an int instead of bool?