It seems that while you can pass sqlalchemy orm objects to widgets as values and have them rendered nicely, if there are validation errors the value is changed to a list of dictionaries. This can cause issues when interacting with the value in the prepare function as well as in validators because accessing dictionary values is different than how you access object properties. Not sure how to handle this but wanted to bring the point up to see if anyone else has noticed this and has any workarounds, or if I am just not doing things correctly.
It seems that while you can pass sqlalchemy orm objects to widgets as values and have them rendered nicely, if there are validation errors the value is changed to a list of dictionaries. This can cause issues when interacting with the value in the prepare function as well as in validators because accessing dictionary values is different than how you access object properties. Not sure how to handle this but wanted to bring the point up to see if anyone else has noticed this and has any workarounds, or if I am just not doing things correctly.