]> git.decadent.org.uk Git - dak.git/commitdiff
dak/process_policy.py: only remove changes entey for rejected uploads
authorAnsgar Burchardt <ansgar@debian.org>
Wed, 15 Aug 2012 19:57:19 +0000 (21:57 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Wed, 15 Aug 2012 19:57:19 +0000 (21:57 +0200)
dak/process_policy.py

index 61c4ef395702112020d1b67f6f1520ce10954ca4..3bde725251c3f6737dbf7bef2e86de7e8b73969c 100755 (executable)
@@ -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()
 
 ################################################################################