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

Proposed by William Grant
Status: Merged
Approved by: Haw Loeung
Approved revision: 57
Merged at revision: 57
Proposed branch: lp:~wgrant/python-oops-tools/prune-by-date
Merge into: lp:python-oops-tools
Diff against target: 12 lines (+1/-1)
1 file modified
src/oopstools/scripts/ (+1/-1)
To merge this branch: bzr merge lp:~wgrant/python-oops-tools/prune-by-date
Reviewer Review Type Date Requested Status
Haw Loeung Approve
Review via email:

Commit message

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

Description of the change

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

To post a comment you must log in.
Revision history for this message
Haw Loeung (hloeung) wrote :

LGTM, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/oopstools/scripts/'
2--- src/oopstools/scripts/ 2012-12-05 17:30:35 +0000
3+++ src/oopstools/scripts/ 2017-07-07 05:39:24 +0000
4@@ -99,7 +99,7 @@
5 except IndexError:
6 # Never been pruned.
7 try:
8- oldest_oops = Oops.objects.order_by('id')[0]
9+ oldest_oops = Oops.objects.order_by('date')[0]
10 except IndexError:
11 # And has no oopses
12 return 0


People subscribed via source and target branches

to all changes: