From ad427928f22d2032071702c7816f06cf674e7cc6 Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Mon, 27 Jan 2014 19:26:36 -0500 Subject: [PATCH] Bryan's comments #264 --- karmaworld/apps/users/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/karmaworld/apps/users/models.py b/karmaworld/apps/users/models.py index d6a9657..15af634 100644 --- a/karmaworld/apps/users/models.py +++ b/karmaworld/apps/users/models.py @@ -27,7 +27,7 @@ class UserProfile(models.Model): school = models.ForeignKey(School, blank=True, null=True) def natural_key(self): - return (self.user) + return (self.user,) def get_points(self): sum = 0 @@ -93,7 +93,7 @@ def give_email_confirm_karma(sender, **kwargs): class BaseKarmaEventManager(models.Manager): """ Handle restoring data. """ def get_by_natural_key(self, points, user, timestamp): - return self.get(points=points, user=user, timestamp=timestamp) + return self.get(user=user, timestamp=timestamp) class BaseKarmaEvent(models.Model): @@ -106,7 +106,7 @@ class BaseKarmaEvent(models.Model): unique_together = ('points', 'user', 'timestamp') def natural_key(self): - return (self.points, self.user, self.timestamp) + return (self.user, self.timestamp) def get_message(self): raise NotImplemented() -- 2.25.1