-def record_comment_event(instance, created, **kwargs):\r
- if created:\r
- act_type = (instance.content_object.__class__ is Question) and TYPE_ACTIVITY_COMMENT_QUESTION or TYPE_ACTIVITY_COMMENT_ANSWER\r
- activity = Activity(user=instance.user, active_at=instance.added_at, content_object=instance, activity_type=act_type)\r
- activity.save()\r
+def record_comment_event(instance, **kwargs):\r
+ act_type = (instance.content_object.__class__ is Question) and TYPE_ACTIVITY_COMMENT_QUESTION or TYPE_ACTIVITY_COMMENT_ANSWER\r
+ activity = Activity(user=instance.user, active_at=instance.added_at, content_object=instance, activity_type=act_type)\r
+ activity.save()\r