diff --git a/core/management/commands/check_works_integrity.py b/core/management/commands/check_works_integrity.py new file mode 100644 index 00000000..5078686f --- /dev/null +++ b/core/management/commands/check_works_integrity.py @@ -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() \ No newline at end of file