From: Ansgar Burchardt Date: Wed, 15 Aug 2012 19:57:19 +0000 (+0200) Subject: dak/process_policy.py: only remove changes entey for rejected uploads X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=ee2ca7524ae00bfa5479f59a5caf568f797c4fc1;p=dak.git dak/process_policy.py: only remove changes entey for rejected uploads --- diff --git a/dak/process_policy.py b/dak/process_policy.py index 61c4ef39..3bde7252 100755 --- a/dak/process_policy.py +++ b/dak/process_policy.py @@ -232,7 +232,9 @@ def real_comment_reject(upload, srcqueue, comments, transaction, notify=True, ma if not Options["No-Action"]: Logger.log(["Policy Queue REJECT", srcqueue.queue_name, upload.changes.changesname]) + changes = upload.changes remove_upload(upload, transaction) + session.delete(changes) ################################################################################ @@ -252,7 +254,6 @@ def remove_upload(upload, transaction): fs.unlink(os.path.join(queuedir, upload.changes.changesname)) session.delete(upload) - session.delete(changes) session.flush() ################################################################################