mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Forcing duplicate stories read to throw an exception. I need to see this happening.
This commit is contained in:
parent
7c1041b713
commit
80f921996e
1 changed files with 1 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue