Print out the number of Editions tied to Works w/o identifiers
parent
7f2cc341d5
commit
3957c9f96a
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue