def action_task_saved(sender, instance, created, **kwargs):

    if created:
        instance.project.create_action("created new task",
            author=instance.editor, action_object=instance)
    else:
        try:
            last_rev = instance.taskrevision_set\
                .select_related('status')\
                .order_by('-created_at')[1]
            if instance.status.is_resolved and not last_rev.status.is_resolved:
                verb = "resolved"
            elif not instance.status.is_resolved and last_rev.status.is_resolved:
                verb = "reopened"
            else:
                verb = "updated"
            instance.project.create_action(verb, action_object=instance,
                author=instance.editor)
        except __HOLE__:
            pass
dataset/ETHPy150Open lukaszb/django-projector/projector/actions.py/action_task_saved