From 240e9870162706228e1e1822de14d11cc4fd19ce Mon Sep 17 00:00:00 2001 From: Jessica Tallon Date: Sat, 4 Oct 2014 11:26:48 +0100 Subject: [PATCH] Fix bug where activity.content was not populated --- mediagoblin/db/models.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 5f78275b..4d7830d2 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -1117,9 +1117,13 @@ class ActivityIntermediator(Base): if key is None: raise ValueError("Invalid type of object given") - # First set self as activity - obj.activity_as_object = self.id + # We need to save so that self.id is populated self.type = key + self.save() + + # First set self as activity + obj.activity = self.id + obj.save() def get(self): """ Finds the object for an activity """ -- 2.25.1