Deleting unstarred story as part of starred story cleanup.

This commit is contained in:
Samuel Clay 2015-02-11 15:55:18 -08:00
parent f4832ce566
commit 86a73d7c91

View file

@ -2196,6 +2196,10 @@ class MStarredStory(mongo.Document):
stat['stories'])
if not dryrun and stat['_id']:
cls.objects.filter(user_id=stat['_id']).delete()
elif not dryrun and stat['_id'] == 0:
print " ---> Deleting unstarred stories (user_id = 0)"
cls.objects.filter(user_id=stat['_id']).delete()
print " ---> Deleted %s stories in total." % total