Change `uploader` to `actor`
authorBoris Bobrov <breton@cynicmansion.ru>
Sun, 31 Jan 2016 23:35:42 +0000 (00:35 +0100)
committerBoris Bobrov <breton@cynicmansion.ru>
Sun, 31 Jan 2016 23:35:42 +0000 (00:35 +0100)
Class User doesn't have field `uploader` any more, instead there
`actor`. Fix several uses of `uploader` to `actor`.

mediagoblin/plugins/processing_info/__init__.py
mediagoblin/user_pages/views.py

index f89378fe99d0030177b821f738b1da4807488667..e5ce0a1c7968091092b07ee7f406104d50cfc521 100644 (file)
@@ -36,13 +36,13 @@ def make_stats(context):
     request = context['request']
     user = request.user
     num_queued = MediaEntry.query.filter_by(
-            uploader=user.id, state=u'processing').count()
+            actor=user.id, state=u'processing').count()
     context['num_queued'] = num_queued
     num_failed = MediaEntry.query.filter_by(
-            uploader=user.id, state=u'failed').count()
+            actor=user.id, state=u'failed').count()
     context['num_failed'] = num_failed
     return context
-                    
+
 
 hooks = {
     'setup': setup_plugin,
index c4f86b299eb180b4f8f3ae070940798469388663..547048d6496572bfa2cc54a4a144698e636a01f8 100644 (file)
@@ -656,7 +656,7 @@ def processing_panel(request, page, url_user):
             request, 'mediagoblin.user_pages.user_home',
             user=user.username)
     # Get media entries which are in-processing
-    entries = (MediaEntry.query.filter_by(uploader=user.id)
+    entries = (MediaEntry.query.filter_by(actor=user.id)
             .order_by(MediaEntry.created.desc()))
 
     try: