First draft of check_works_integrity command to check for data integrity issues with Works, Editions, Identifiers

pull/1/head
Raymond Yee 2012-01-30 12:22:53 -08:00
parent 052e523f22
commit d285e32b2b
1 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,8 @@
from django.core.management.base import BaseCommand
from regluit.core import models
class Command(BaseCommand):
help = "Do a few integrity checks on Works, Editions, and Identifiers"
def handle(self, **options):
print "Number of Works without identifiers:", models.Work.objects.filter(identifiers__isnull=True).count()