aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools
diff options
context:
space:
mode:
authorJessica Tallon <tsyesika@tsyesika.se>2015-06-24 21:22:03 +0200
committerJessica Tallon <tsyesika@tsyesika.se>2015-06-24 21:43:16 +0200
commitddc2db746f3291dbe11393a814eed9a0fd651365 (patch)
tree69c068c19c82875a16fbcd8dbe00c50b74c17873 /mediagoblin/tools
parent2d73983e8ca353f47ad25642e1e0c292d94b20d5 (diff)
downloadmediagoblin-ddc2db746f3291dbe11393a814eed9a0fd651365.tar.lz
mediagoblin-ddc2db746f3291dbe11393a814eed9a0fd651365.tar.xz
mediagoblin-ddc2db746f3291dbe11393a814eed9a0fd651365.zip
Fix removal of ActivityIntermediatory migration
The migration had a problem where other tables still referenced the migration as well as a typo in an earlier migration. They have both been fixed and tested on PostgreSQL and SQLite3. This also fixes a bug where sometimes when creating an activity it'd raise an Exception as the object hadn't got an ID. This has been fixed globally with a fix to the create_activity federation tool.
Diffstat (limited to 'mediagoblin/tools')
-rw-r--r--mediagoblin/tools/federation.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mediagoblin/tools/federation.py b/mediagoblin/tools/federation.py
index e7593a92..39b465bf 100644
--- a/mediagoblin/tools/federation.py
+++ b/mediagoblin/tools/federation.py
@@ -71,6 +71,10 @@ def create_activity(verb, obj, actor, target=None, generator=None):
)
generator.save()
+ # Ensure the object has an ID which is needed by the activity.
+ obj.save(commit=False)
+
+ # Create the activity
activity = Activity(verb=verb)
activity.object = obj