fix(reflex-base): infer scalar association proxy as the proxied type

UM
15h ago
+81-6

get_attribute_access_type wrapped every SQLAlchemy association_proxy in list[...], scalar ones included. A state var for a scalar proxy such as association_proxy("profile", "name") was therefore typed list[str], so State.user.profile_name.upper() failed at app build time with VarAttributeError.

Root cause: the AssociationProxyInstance branch never checked whether the proxy is scalar. It now returns the proxied attribute's type when attr.scalar is set and keeps list[...] for collection proxies.

Test: uv run pytest tests/units/test_attribute_access_type.py -q → 234 passed (the new test_get_attribute_access_type_sqlalchemy_association_proxy fails before the change, passes after).

Closes #8043.

Disclosure: prepared with AI assistance; the fix and tests were run locally as shown above.