Wouldn't the Name object's primary key not match the User object's primary key? I think temp = Name.objects.get(primary=True, user=self.user) would do the trick.