]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Don't assume m2o key is present in the dictionary
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 23 Jul 2019 13:24:32 +0000 (09:24 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 23 Jul 2019 13:24:32 +0000 (09:24 -0400)
commit8f5b65f4316e21d19b00266cdd9eded3d4ec51b2
tree02797202119399cf14eec1fcc2ecb6e2c551f7b3
parent629ab1d9b8b86a2695e55543f4064df6e5775844
Don't assume m2o key is present in the dictionary

Fixed regression caused by new selectinload for many-to-one logic where
a primaryjoin condition not based on real foreign keys would cause
KeyError if a related object did not exist for a given key value on the
parent object.

Fixes: #4777
Change-Id: I4ba96318302be68abe0e8c3611684087a04a2322
doc/build/changelog/unreleased_13/4777.rst [new file with mode: 0644]
lib/sqlalchemy/orm/strategies.py
test/orm/test_selectin_relations.py