diff options
author | Jessica Tallon <tsyesika@tsyesika.se> | 2015-10-07 13:13:40 +0200 |
---|---|---|
committer | Jessica Tallon <tsyesika@tsyesika.se> | 2015-10-07 15:07:54 +0200 |
commit | d216d771f662fc3e0a3417ce06e8355abce99988 (patch) | |
tree | 7502682047ad22ec40d13d18ffb84a284d1e92ac /mediagoblin/api | |
parent | bc75a6532712e4b9b0f6d8b5bbd93db3ef58335d (diff) | |
download | mediagoblin-d216d771f662fc3e0a3417ce06e8355abce99988.tar.lz mediagoblin-d216d771f662fc3e0a3417ce06e8355abce99988.tar.xz mediagoblin-d216d771f662fc3e0a3417ce06e8355abce99988.zip |
Add public_id fixes throughout the code
This adds several things, mainly code which checks for the public id and
if it doesn't exist generating it where it can. This is to because we
need to keep the public_id to be able to effectively soft delete models.
This also adds a public_id field to the Activity along with a migration.
Diffstat (limited to 'mediagoblin/api')
-rw-r--r-- | mediagoblin/api/views.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mediagoblin/api/views.py b/mediagoblin/api/views.py index d3eaacc9..c515a8fa 100644 --- a/mediagoblin/api/views.py +++ b/mediagoblin/api/views.py @@ -500,6 +500,10 @@ def feed_endpoint(request, outbox=None): "No such 'image' with id '{0}'.".format(obj_id) ) + # Okay lets do our best to ensure there is a public_id for + # this image, there most likely is but it's important! + entry.get_public_id(request.urlgen) + # Make the delete activity generator = create_generator(request) activity = create_activity( |