X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/6d42bc478e3d1bd90eb294464748c21e4de0fc63..5ae011626f0d613dc7ca667c25c95d9cc4a1ab47:/src/catalogue/tasks.py?ds=sidebyside diff --git a/src/catalogue/tasks.py b/src/catalogue/tasks.py index 781dd6e3c..499e8e659 100644 --- a/src/catalogue/tasks.py +++ b/src/catalogue/tasks.py @@ -65,3 +65,10 @@ def build_custom_pdf(book_id, customizations, file_name, waiter_id=None): def update_counters(): from .helpers import update_counters update_counters() + + +@task(ignore_result=True) +def update_references(book_id): + from catalogue.models import Book + Book.objects.get(id=book_id).update_references() +