Ooops...didn't sort the Works w/o identifiers in reverse chronological order

pull/1/head
Raymond Yee 2012-01-30 13:37:48 -08:00
parent f5029004bb
commit 874964a1d4
1 changed files with 2 additions and 1 deletions

View File

@ -6,7 +6,8 @@ class Command(BaseCommand):
def handle(self, **options):
print "Number of Works without identifiers: ", models.Work.objects.filter(identifiers__isnull=True).count()
for w in models.Work.objects.filter(identifiers__isnull=True)[0:20]:
print "Last 20 Works without identifiers: "
for w in models.Work.objects.filter(identifiers__isnull=True).order_by('-created')[0:20]:
print "id: %d | title: %s | created: %s" % (w.id, w.title, w.created)
print "Number of Identifiers not tied to Works (should be 0): ", \