Trying to nail down what happens to editions tied to orphan that we delete
parent
0924b0de9a
commit
7f2cc341d5
|
@ -10,6 +10,10 @@ class Command(BaseCommand):
|
|||
print "Last 20 Works without identifiers: "
|
||||
for w in models.Work.objects.filter(identifiers__isnull=True).order_by('-created')[0:20]:
|
||||
print "id: %d | title: %s | created: %s" % (w.id, w.title, w.created)
|
||||
|
||||
# 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()
|
||||
|
||||
print "Number of Identifiers not tied to Works (should be 0): ", \
|
||||
models.Identifier.objects.filter(work__isnull=True).count()
|
||||
|
|
Loading…
Reference in New Issue