def save(self, *args, **kwargs):
if not self.pk:<EOL><INDENT>old_votes = Vote.objects.filter(user=self.user, node=self.node)<EOL>for old_vote in old_votes:<EOL><INDENT>old_vote.delete()<EOL><DEDENT><DEDENT>super(Vote, self).save(*args, **kwargs)<EOL>
ensure users cannot vote the same node multiple times
but let users change their votes