aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/submit/lib.py
diff options
context:
space:
mode:
authorJessica Tallon <tsyesika@tsyesika.se>2015-09-17 13:47:56 +0200
committerJessica Tallon <tsyesika@tsyesika.se>2015-10-07 14:40:44 +0200
commit0f3bf8d4b180ffd1907d1578e087522aad7d9158 (patch)
tree22279f7ff895047d1ec3c68bedb69a081cc0871a /mediagoblin/submit/lib.py
parent80ba8ad1d1badb2f6330f25c540dc413e42e7d5c (diff)
downloadmediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.tar.lz
mediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.tar.xz
mediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.zip
Collection changes and migration for federation
- Adds a "type" column to the Collection object and allows the CollectionItem model to contain any object. - Changes "items" to "num_items" as per TODO - Renames "uploader", "creator" and "user" to a common "actor" in most places
Diffstat (limited to 'mediagoblin/submit/lib.py')
-rw-r--r--mediagoblin/submit/lib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/submit/lib.py b/mediagoblin/submit/lib.py
index a0e1cf90..77dd836b 100644
--- a/mediagoblin/submit/lib.py
+++ b/mediagoblin/submit/lib.py
@@ -52,7 +52,7 @@ def new_upload_entry(user):
Create a new MediaEntry for uploading
"""
entry = MediaEntry()
- entry.uploader = user.id
+ entry.actor = user.id
entry.license = user.license_preference
return entry
@@ -198,7 +198,7 @@ def submit_media(mg_app, user, submitted_file, filename,
add_comment_subscription(user, entry)
# Create activity
- create_activity("post", entry, entry.uploader)
+ create_activity("post", entry, entry.actor)
entry.save()
# Pass off to processing
@@ -297,7 +297,7 @@ def api_add_to_feed(request, entry):
activity = create_activity(
verb="post",
obj=entry,
- actor=entry.uploader,
+ actor=entry.actor,
generator=create_generator(request)
)
entry.save()