From 4c0b1c26b2e4789b194f34c907c822c55f04af3c Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 25 Sep 2014 12:28:12 +0200 Subject: [PATCH] Bugfix Tah.after_change signal handler. --- apps/catalogue/signals.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) -- 2.20.1