mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-19 12:58:29 +00:00
Suppressing error on starring an already starred story.
This commit is contained in:
parent
1f92ba5d59
commit
ab8b106057
1 changed files with 5 additions and 2 deletions
|
@ -1065,8 +1065,11 @@ def mark_story_as_starred(request):
|
|||
if k is not None and v is not None])
|
||||
now = datetime.datetime.now()
|
||||
story_values = dict(user_id=request.user.pk, starred_date=now, **story_db)
|
||||
MStarredStory.objects.create(**story_values)
|
||||
logging.user(request, "~FCStarring: ~SB%s" % (story[0].story_title[:50]))
|
||||
starred_story, created = MStarredStory.objects.get_or_create(**story_values)
|
||||
if created:
|
||||
logging.user(request, "~FCStarring: ~SB%s" % (story[0].story_title[:50]))
|
||||
else:
|
||||
logging.user(request, "~FC~BRAlready stared:~SN~FC ~SB%s" % (story[0].story_title[:50]))
|
||||
else:
|
||||
code = -1
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue