fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unused imports
[redakcja.git]
/
apps
/
catalogue
/
tasks.py
diff --git
a/apps/catalogue/tasks.py
b/apps/catalogue/tasks.py
index
c386c22
..
d71542c
100644
(file)
--- 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
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)
finally:
translation.activate(prev_language)
+
def refresh_instance(instance):
_refresh_by_pk.delay(type(instance), instance.pk, translation.get_language())
def refresh_instance(instance):
_refresh_by_pk.delay(type(instance), instance.pk, translation.get_language())