From a7b7a5db70183635c76031b8d9407ac7766c1a0e Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Mon, 30 Dec 2013 23:31:11 -0500 Subject: [PATCH] Don't let one error halt document indexing --- .../apps/notes/management/commands/populate_indexden.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/karmaworld/apps/notes/management/commands/populate_indexden.py b/karmaworld/apps/notes/management/commands/populate_indexden.py index 4573b8c..421c0cc 100644 --- a/karmaworld/apps/notes/management/commands/populate_indexden.py +++ b/karmaworld/apps/notes/management/commands/populate_indexden.py @@ -16,6 +16,9 @@ class Command(BaseCommand): notes = Note.objects.all() for note in notes: - print "Indexing {n}".format(n=note) - add_document(note) + try: + print "Indexing {n}".format(n=note) + add_document(note) + except: + continue -- 2.25.1