X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d69fc5f16ed739c02685e7d695abf6de59c2bf5e..ab81d95154bd35a67078cc6c926b5b9fbdd9011b:/apps/catalogue/signals.py?ds=sidebyside 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)