From: Radek Czajka Date: Thu, 25 Sep 2014 10:28:12 +0000 (+0200) Subject: Bugfix Tah.after_change signal handler. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/4c0b1c26b2e4789b194f34c907c822c55f04af3c Bugfix Tah.after_change signal handler. --- diff --git a/apps/catalogue/signals.py b/apps/catalogue/signals.py index 72607213d..660d26493 100644 --- a/apps/catalogue/signals.py +++ b/apps/catalogue/signals.py @@ -81,13 +81,13 @@ def tag_after_change(sender, instance, languages, **kwargs): for lang in [lc for (lc, _ln) in settings.LANGUAGES]]) for model in Book, Picture: - for instance in model.tagged.with_all([instance]).only('pk'): - instance.flush_includes() + for model_instance in model.tagged.with_all([instance]).only('pk'): + model_instance.flush_includes() if instance.category == 'author': for model in Fragment, PictureArea: - for instance in model.tagged.with_all([instance]).only('pk'): - instance.flush_includes() + for model_instance in model.tagged.with_all([instance]).only('pk'): + model_instance.flush_includes() @receiver(tags_updated)