summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-01-23 18:02:17 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2021-01-24 16:38:36 -0500
commitd446d8df1b2456c3444a4e0ebc0cb76ef03afac5 (patch)
tree8f0b7ffe733d33fa3a76d085fd4544816477cdb2 /lib/sqlalchemy
parent33b12754f9aa0aaee2bdac01faeade7ecc93f028 (diff)
downloadsqlalchemy-d446d8df1b2456c3444a4e0ebc0cb76ef03afac5.tar.gz
Remove errant assertion from unit of work
Fixed ORM unit of work regression where an errant "assert primary_key" statement interferes with primary key generation sequences that don't actually consider the columns in the table to use a real primary key constraint, instead using :paramref:`_orm.mapper.primary_key` to establish certain columns as "primary". Also remove errant "identity" requirement which does not seem to represent any current backend and is applied to test/sql/test_defaults.py->AutoIncrementTest, but these tests work on all backends. Fixes: #5867 Change-Id: I4502ca5079d824d7b4d055194947aa1a00effde7
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/persistence.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/persistence.py b/lib/sqlalchemy/orm/persistence.py
index b57963eb3..42b787580 100644
--- a/lib/sqlalchemy/orm/persistence.py
+++ b/lib/sqlalchemy/orm/persistence.py
@@ -1222,7 +1222,6 @@ def _emit_insert_statements(
)
primary_key = result.inserted_primary_key
- assert primary_key
for pk, col in zip(
primary_key, mapper._pks_by_table[table]
):