Skip to content

Commit

Permalink
Update integreat_cms/core/signals/contact_signals.py
Browse files Browse the repository at this point in the history
Co-authored-by: David Venhoff <david.venhoff@tuerantuer.org>
  • Loading branch information
charludo and david-venhoff authored Dec 12, 2024
1 parent 60e94e4 commit 01d912f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions integreat_cms/core/signals/contact_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

0 comments on commit 01d912f

Please sign in to comment.