mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Fixing a few exceptions.
This commit is contained in:
parent
e6c9a3db82
commit
217dc139ae
2 changed files with 7 additions and 3 deletions
|
@ -881,7 +881,11 @@ class MSocialSubscription(mongo.Document):
|
|||
logging.user(request, "~FYRead story in social subscription: %s" % (sub_username))
|
||||
|
||||
for story_id in set(story_ids):
|
||||
story = MSharedStory.objects.get(user_id=self.subscription_user_id, story_guid=story_id)
|
||||
try:
|
||||
story = MSharedStory.objects.get(user_id=self.subscription_user_id,
|
||||
story_guid=story_id)
|
||||
except MSharedStory.DoesNotExist:
|
||||
continue
|
||||
now = datetime.datetime.utcnow()
|
||||
date = now if now > story.story_date else story.story_date # For handling future stories
|
||||
if not feed_id:
|
||||
|
|
|
@ -1207,7 +1207,7 @@ def load_social_settings(request, social_user_id, username=None):
|
|||
def load_interactions(request):
|
||||
user_id = request.REQUEST.get('user_id', None)
|
||||
categories = request.GET.getlist('category')
|
||||
if not user_id:
|
||||
if not user_id or 'null' in user_id:
|
||||
user_id = get_user(request).pk
|
||||
page = max(1, int(request.REQUEST.get('page', 1)))
|
||||
limit = request.REQUEST.get('limit')
|
||||
|
@ -1231,7 +1231,7 @@ def load_interactions(request):
|
|||
def load_activities(request):
|
||||
user_id = request.REQUEST.get('user_id', None)
|
||||
categories = request.GET.getlist('category')
|
||||
if user_id:
|
||||
if user_id and 'null' not in user_id:
|
||||
user_id = int(user_id)
|
||||
user = User.objects.get(pk=user_id)
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue