Print out the number of Editions tied to Works w/o identifiers

pull/1/head
Raymond Yee 2012-01-31 14:19:10 -08:00
parent 7f2cc341d5
commit 3957c9f96a
1 changed files with 1 additions and 2 deletions

View File

@ -13,8 +13,7 @@ class Command(BaseCommand):
# models.Work.objects.filter(identifiers__isnull=True).filter(editions__isnull=False)[0].identifiers.all()
print "Number of editions that are currently tied to Works w/o identifiers ", \
models.Work.objects.filter(identifiers__isnull=True).filter(editions__isnull=False).count()
models.Edition.objects.filter(work__identifiers__isnull=True).count()
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()