← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/python-oops-tools/prune-by-date into lp:python-oops-tools

 

William Grant has proposed merging lp:~wgrant/python-oops-tools/prune-by-date into lp:python-oops-tools.

Commit message:
Fix prune to find oldest OOPS by date, not by ID.

Requested reviews:
  python-oops-tools reviewers (oops-tools-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/python-oops-tools/prune-by-date/+merge/326979

Fix prune to find oldest OOPS by date, not by ID.
-- 
Your team python-oops-tools reviewers is requested to review the proposed merge of lp:~wgrant/python-oops-tools/prune-by-date into lp:python-oops-tools.
=== modified file 'src/oopstools/scripts/prune.py'
--- src/oopstools/scripts/prune.py	2012-12-05 17:30:35 +0000
+++ src/oopstools/scripts/prune.py	2017-07-07 05:39:24 +0000
@@ -99,7 +99,7 @@
     except IndexError:
         # Never been pruned.
         try:
-            oldest_oops = Oops.objects.order_by('id')[0]
+            oldest_oops = Oops.objects.order_by('date')[0]
         except IndexError:
             # And has no oopses
             return 0