<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save(self, *args, **kwargs):
 """ ensure users cannot rate the same node multiple times but let users change their rating """

        if not self.pk:
            old_ratings = Rating.objects.filter(user=self.user, node=self.node)
            for old_rating in old_ratings:
                old_rating.delete()
        super(Rating, self).save(*args, **kwargs)