fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
#1189: generate theme table for Redmine
[redakcja.git]
/
apps
/
catalogue
/
tasks.py
diff --git
a/apps/catalogue/tasks.py
b/apps/catalogue/tasks.py
index
e9b8cf9
..
3e23037
100644
(file)
--- a/
apps/catalogue/tasks.py
+++ b/
apps/catalogue/tasks.py
@@
-9,3
+9,12
@@
def refresh_by_pk(cls, pk):
def refresh_instance(instance):
refresh_by_pk.delay(type(instance), instance.pk)
def refresh_instance(instance):
refresh_by_pk.delay(type(instance), instance.pk)
+
+@task
+def publishable_error(book):
+ try:
+ book.assert_publishable()
+ except AssertionError, e:
+ return e
+ else:
+ return None