diff --git a/apps/social/migrations/0002_story_db_id.py b/apps/social/migrations/0002_story_db_id.py index 3451ee463..1a1def24a 100644 --- a/apps/social/migrations/0002_story_db_id.py +++ b/apps/social/migrations/0002_story_db_id.py @@ -9,10 +9,10 @@ class Migration(DataMigration): def forwards(self, orm): stories = MSharedStory.objects.filter(story_db_id__exists=False) - print " ---> %s stories with no story_db_id" % stories.count() - + story_count = stories.count() + print " ---> %s stories with no story_db_id" % story_count for i, story in enumerate(stories): - print " ---> %s/%s" % (i+1, stories.count()) + print " ---> %s/%s" % (i+1, story_count) story.ensure_story_db_id() def backwards(self, orm): diff --git a/apps/social/models.py b/apps/social/models.py index d442c9cae..97d683f02 100644 --- a/apps/social/models.py +++ b/apps/social/models.py @@ -1509,7 +1509,7 @@ class MSharedStory(mongo.Document): Site.objects.get_current().domain.replace('www', 'dev'), reverse('social-mute-story', kwargs={ 'secret_token': user.profile.secret_token, - 'shared_story_id': self._id, + 'shared_story_id': self.id, }) ) data = { @@ -1564,7 +1564,7 @@ class MSharedStory(mongo.Document): Site.objects.get_current().domain.replace('www', 'dev'), reverse('social-mute-story', kwargs={ 'secret_token': original_user.profile.secret_token, - 'shared_story_id': original_shared_story._id, + 'shared_story_id': original_shared_story.id, }) ) data = {