From 6971bf0918f5e6fb58020950f74bda094a53a77d Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Sat, 22 Jan 2011 13:49:29 +0100 Subject: [PATCH] Remove some useless session.flush() calls. We are using sqlalchemy's autoflush mode. Signed-off-by: Torsten Werner --- daklib/dbconn.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 611b30a0..9c1ed2b3 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -2266,12 +2266,10 @@ def add_dsc_to_db(u, filename, session=None): source.poolfile_id = entry["files id"] session.add(source) - session.flush() suite_names = u.pkg.changes["distribution"].keys() source.suites = session.query(Suite). \ filter(Suite.suite_name.in_(suite_names)).all() - session.flush() # Add the source files to the DB (files and dsc_files) dscfile = DSCFile() @@ -2321,8 +2319,6 @@ def add_dsc_to_db(u, filename, session=None): df.poolfile_id = files_id session.add(df) - session.flush() - # Add the src_uploaders to the DB uploader_ids = [source.maintainer_id] if u.pkg.dsc.has_key("uploaders"): -- 2.39.5