Forcing duplicate stories read to throw an exception. I need to see this happening.

This commit is contained in:
Samuel Clay 2010-09-10 09:02:11 -07:00
parent 7c1041b713
commit 80f921996e

View file

@ -349,11 +349,7 @@ def mark_story_as_read(request):
story = MStory.objects(story_feed_id=feed_id, story_guid=story_id)[0]
now = datetime.datetime.now()
m = MUserStory(story=story, user_id=request.user.pk, feed_id=feed_id, read_date=now)
try:
m.save()
data.update({'code': 1})
except OperationError:
data.update({'code': -1})
m.save()
return data