First draft of check_works_integrity command to check for data integrity issues with Works, Editions, Identifiers
parent
052e523f22
commit
d285e32b2b
|
@ -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()
|
Loading…
Reference in New Issue