]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
return None for no parententity on Proxy
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 21 Mar 2023 17:32:41 +0000 (13:32 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 21 Mar 2023 17:33:09 +0000 (13:33 -0400)
commitc8fb843a2d92e5d8d2271d46ddde02a2c79ee94c
treed50cce870c4226d9f7989fc4e3afe3acfa4b7fce
parentfa0666cb04174cdd2592ab1327d48e431fe86ffa
return None for no parententity on Proxy

Fixed regression where accessing the expression value of a hybrid property
on a class that was either unmapped or not-yet-mapped (such as calling upon
it within a :func:`_orm.declared_attr` method) would raise an internal
error, as an internal fetch for the parent class' mapper would fail and an
instruction for this failure to be ignored were inadvertently removed in
2.0.

Fixes: #9519
Change-Id: If195d26a5ddd2312a373004eb7a1403e1d11e7a4
doc/build/changelog/unreleased_20/9519.rst [new file with mode: 0644]
lib/sqlalchemy/orm/attributes.py
test/ext/test_hybrid.py