From: Jan Szejko Date: Wed, 25 Jan 2017 13:29:25 +0000 (+0100) Subject: republish lessons - don't stop on exceptions X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/792eb089b2e60783b184c7434890eeaec567e079?ds=sidebyside republish lessons - don't stop on exceptions --- 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():