X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/a494a95bf89ed6aa55b5f14b71a343e33d55bd60..d5ffd31f4dca5ab0144fae542e048934bafa7110:/apps/catalogue/tasks.py?ds=sidebyside diff --git a/apps/catalogue/tasks.py b/apps/catalogue/tasks.py index c386c22b..d71542c3 100644 --- a/apps/catalogue/tasks.py +++ b/apps/catalogue/tasks.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from celery.task import task from django.utils import translation @@ -11,6 +12,7 @@ def _refresh_by_pk(cls, pk, language=None): finally: translation.activate(prev_language) + def refresh_instance(instance): _refresh_by_pk.delay(type(instance), instance.pk, translation.get_language())