From c591eb4a7aa96756aded544031d92f3a9a050266 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Tue, 17 Mar 2026 17:04:13 -0400 Subject: [PATCH] Do not ignore errors on activity stream connection (#16344) --- awx/main/registrar.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/awx/main/registrar.py b/awx/main/registrar.py index 31133f936b..0e105f7b0d 100644 --- a/awx/main/registrar.py +++ b/awx/main/registrar.py @@ -19,13 +19,8 @@ class ActivityStreamRegistrar(object): pre_delete.connect(activity_stream_delete, sender=model, dispatch_uid=str(self.__class__) + str(model) + "_delete") for m2mfield in model._meta.many_to_many: - try: - m2m_attr = getattr(model, m2mfield.name) - m2m_changed.connect( - activity_stream_associate, sender=m2m_attr.through, dispatch_uid=str(self.__class__) + str(m2m_attr.through) + "_associate" - ) - except AttributeError: - pass + m2m_attr = getattr(model, m2mfield.name) + m2m_changed.connect(activity_stream_associate, sender=m2m_attr.through, dispatch_uid=str(self.__class__) + str(m2m_attr.through) + "_associate") def disconnect(self, model): if model in self.models: