Added a display of the last 20 Works w/o identifiers

pull/1/head
Raymond Yee 2012-01-30 13:34:10 -08:00
parent 078c853baf
commit f5029004bb
1 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,9 @@ 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 "id: %d | title: %s | created: %s" % (w.id, w.title, w.created)
print "Number of Identifiers not tied to Works (should be 0): ", \
models.Identifier.objects.filter(work__isnull=True).count()
print "Number of Editions not tied to a Work (should be 0): ", models.Edition.objects.filter(work__isnull=True).count()