Since SQLAlchemy 1.4, the return value from Session.execute() is now a CursorResult object and the type of
CursorResult.inserted_primary_key is now a tuple, not a list.
@RudolfCardinal the assert was added in 04599ca928a5d66da732598c55503986abda18da. I don't suppose you remember why? I suppose we could keep the len(inserted_pks) == 1 if we wanted.
I missed this when upgrading to SQL Alchemy 1.4
Since SQLAlchemy 1.4, the return value from Session.execute() is now a CursorResult object and the type of CursorResult.inserted_primary_key is now a tuple, not a list.
@RudolfCardinal the assert was added in 04599ca928a5d66da732598c55503986abda18da. I don't suppose you remember why? I suppose we could keep the
len(inserted_pks) == 1
if we wanted.Old docs: https://docs.sqlalchemy.org/en/13/core/connections.html#sqlalchemy.engine.ResultProxy.inserted_primary_key New docs: https://docs.sqlalchemy.org/en/14/core/connections.html#sqlalchemy.engine.CursorResult.inserted_primary_key