From d216d771f662fc3e0a3417ce06e8355abce99988 Mon Sep 17 00:00:00 2001 From: Jessica Tallon Date: Wed, 7 Oct 2015 13:13:40 +0200 Subject: 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. --- mediagoblin/api/views.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mediagoblin/api') 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( -- cgit v1.2.3