]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/models/user.py
Converted the new question notification template.
[osqa.git] / forum / models / user.py
index 62eeac3aeb6fc9d6d1c3dae21b1f0b05356cdb1a..339c02d727f64fd6ecb8878bca8211eb313d5cf1 100644 (file)
@@ -158,7 +158,7 @@ class User(BaseModel, DjangoUser):
     def get_vote_count_today(self):\r
         today = datetime.date.today()\r
         return self.actions.filter(canceled=False, action_type__in=("voteup", "votedown"),\r
-                action_date__range=(today - datetime.timedelta(days=1), today)).count()\r
+                action_date__gte=(today - datetime.timedelta(days=1))).count()\r
 \r
     def get_reputation_by_upvoted_today(self):\r
         today = datetime.datetime.now()\r
@@ -170,7 +170,7 @@ class User(BaseModel, DjangoUser):
     def get_flagged_items_count_today(self):\r
         today = datetime.date.today()\r
         return self.actions.filter(canceled=False, action_type="flag",\r
-                action_date__range=(today - datetime.timedelta(days=1), today)).count()\r
+                action_date__gte=(today - datetime.timedelta(days=1))).count()\r
 \r
     @true_if_is_super_or_staff\r
     def can_view_deleted_post(self, post):\r