mirror of
https://github.com/ansible/awx.git
synced 2026-05-22 16:27:42 -02:30
Fixed unit test error caused by extra definition of ActivityStream model. Rearranged imports of signal handlers.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import logging
|
||||
|
||||
from django.db.models.signals import pre_save, post_save, post_delete, m2m_changed
|
||||
from signals import activity_stream_create, activity_stream_update, activity_stream_delete, activity_stream_associate
|
||||
|
||||
logger = logging.getLogger('awx.main.registrar')
|
||||
|
||||
@@ -11,6 +10,8 @@ class ActivityStreamRegistrar(object):
|
||||
self.models = []
|
||||
|
||||
def connect(self, model):
|
||||
from awx.main.signals import activity_stream_create, activity_stream_update, activity_stream_delete, activity_stream_associate
|
||||
|
||||
#(receiver, sender=model, dispatch_uid=self._dispatch_uid(signal, model))
|
||||
if model not in self.models:
|
||||
self.models.append(model)
|
||||
|
||||
Reference in New Issue
Block a user