From f50dfc2347997f1c3ab96a8dce7238cea4cc4632 Mon Sep 17 00:00:00 2001 From: Ilya Date: Wed, 14 Aug 2013 20:09:13 -0700 Subject: [PATCH] last_inserted_ids() in sqlalchemy was deprecated by inserted_primary_key not primary_key --- fixture/loadable/sqlalchemy_loadable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fixture/loadable/sqlalchemy_loadable.py b/fixture/loadable/sqlalchemy_loadable.py index 934a9b0..67d602b 100644 --- a/fixture/loadable/sqlalchemy_loadable.py +++ b/fixture/loadable/sqlalchemy_loadable.py @@ -326,8 +326,8 @@ def save(self, row, column_vals): c = stmt.execute(params) # In SQLAlchemy 0.8 this changed to a property with another name - if hasattr(c, "primary_key"): - primary_key = c.primary_key + if hasattr(c, "inserted_primary_key"): + primary_key = c.inserted_primary_key else: primary_key = c.last_inserted_ids()