fnp
/
edumed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8e98310
)
republish lessons - don't stop on exceptions
author
Jan Szejko
<janek37@gmail.com>
Wed, 25 Jan 2017 13:29:25 +0000
(14:29 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Wed, 25 Jan 2017 13:29:25 +0000
(14:29 +0100)
catalogue/management/commands/republish.py
patch
|
blob
|
history
diff --git
a/catalogue/management/commands/republish.py
b/catalogue/management/commands/republish.py
index
d02eded
..
63e072d
100644
(file)
--- 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
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():
print 'Rebuilding levels...'
for level in Level.objects.all():