diff --git a/djangochannelsrestframework/observer/model_observer.py b/djangochannelsrestframework/observer/model_observer.py index 8c5d710..a4cce5d 100644 --- a/djangochannelsrestframework/observer/model_observer.py +++ b/djangochannelsrestframework/observer/model_observer.py @@ -61,11 +61,11 @@ def _connect(self): # this is used to capture the current state for the model post_init.connect( - self.post_init_receiver, sender=self.model_cls, dispatch_uid=id(self) + self.post_init_receiver, sender=self.model_cls, dispatch_uid=str(id(self)) ) post_save.connect( - self.post_save_receiver, sender=self.model_cls, dispatch_uid=id(self) + self.post_save_receiver, sender=self.model_cls, dispatch_uid=str(id(self)) ) for field in self.model_cls._meta.many_to_many: @@ -76,7 +76,7 @@ def _connect(self): ) post_delete.connect( - self.post_delete_receiver, sender=self.model_cls, dispatch_uid=id(self) + self.post_delete_receiver, sender=self.model_cls, dispatch_uid=str(id(self)) ) def post_init_receiver(self, instance: Model, **kwargs):