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