def save(self, *args, **kwargs): res = super().save(*args, **kwargs) create_comment_signal.send(sender=self.__class__, content_object=res, comment=self.cleaned_data['comment'], timestamp=None) return res
def save(self, *args, **kwargs): res = super().save(*args, **kwargs) comment = self.cleaned_data.get("comment") if comment: create_comment_signal.send( sender=self.__class__, content_object=res, comment=comment, timestamp=None, ) return res