From 01d912f5bf275a48b7fe32a21aa98568a3aefdc0 Mon Sep 17 00:00:00 2001 From: Charlotte <47758554+charludo@users.noreply.github.com> Date: Thu, 12 Dec 2024 08:30:13 +0100 Subject: [PATCH] Update integreat_cms/core/signals/contact_signals.py Co-authored-by: David Venhoff --- integreat_cms/core/signals/contact_signals.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/integreat_cms/core/signals/contact_signals.py b/integreat_cms/core/signals/contact_signals.py index 50e3ea28da..af575e96e6 100644 --- a/integreat_cms/core/signals/contact_signals.py +++ b/integreat_cms/core/signals/contact_signals.py @@ -35,6 +35,8 @@ def contact_save_handler(instance: Contact, **kwargs: Any) -> None: + list(instance.referring_event_translations) ) for referrer in referring_objects: + if getattr(referrer.foreign_object, "archived", False): + continue logger.debug("Updating %r, since it references %r.", referrer, instance) referrer.content = clean_content(referrer.content, referrer.language.slug) referrer.save(update_fields=["content"])