]> 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:25:59 +0000 (09:25 -0400)
commitc4e7feddd757d53dd9783d2002ee1b9daa7f0b3a
treea2b1959a09493956663a9d8e21a2df4b272563d5
parentc46cdd3d9249b84f145ef1b3641a7d6a54af5e7c
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
(cherry picked from commit 8f5b65f4316e21d19b00266cdd9eded3d4ec51b2)
doc/build/changelog/unreleased_13/4777.rst [new file with mode: 0644]
lib/sqlalchemy/orm/strategies.py
test/orm/test_selectin_relations.py