From 792eb089b2e60783b184c7434890eeaec567e079 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Wed, 25 Jan 2017 14:29:25 +0100 Subject: [PATCH 1/1] republish lessons - don't stop on exceptions --- catalogue/management/commands/republish.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/catalogue/management/commands/republish.py b/catalogue/management/commands/republish.py index d02eded..63e072d 100644 --- a/catalogue/management/commands/republish.py +++ b/catalogue/management/commands/republish.py @@ -21,7 +21,11 @@ class Command(BaseCommand): for lesson in Lesson.objects.all(): print print 'Republishing: %s' % lesson.slug - lesson.republish(repackage_level=False, attachments=attachments) + try: + lesson.republish(repackage_level=False) + except BaseException as e: + print '!!!!!! EXCEPTION !!!!!!' + print e print 'Rebuilding levels...' for level in Level.objects.all(): -- 2.20.1