]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/users.py
some cleanup on the listing of subscriptions and changing how we fetch the subscriptions
[osqa.git] / forum / views / users.py
index 836b62172ef5829f07aff78931221290eb4e1b3f..03745aeb35714aed60bd8b6b6cbfe6b4de721494 100644 (file)
@@ -329,10 +329,12 @@ def user_subscriptions(request, user):
         \r
     if auto == 'True':\r
         show_auto = True\r
-        subscriptions = user.subscriptions.all().order_by('-questionsubscription__last_view')\r
+        subscriptions = QuestionSubscription.objects.filter(user=user).order_by('-last_view')        \r
+        #subscriptions = user.subscriptions.all().order_by('-questionsubscription__last_view')\r
     else:\r
         show_auto = False\r
-        subscriptions = user.subscriptions.filter(questionsubscription__auto_subscription=False).order_by('-questionsubscription__last_view')\r
+        subscriptions = QuestionSubscription.objects.filter(user=user, auto_subscription=False).order_by('-last_view')\r
+        #subscriptions = user.subscriptions.filter(questionsubscription__auto_subscription=False).order_by('-questionsubscription__last_view')\r
 \r
     if request.method == 'POST':\r
         manage_open = False\r