diff --git a/apps/rss_feeds/models.py b/apps/rss_feeds/models.py index c343e833a..ad2963412 100644 --- a/apps/rss_feeds/models.py +++ b/apps/rss_feeds/models.py @@ -194,7 +194,7 @@ class Feed(models.Model): if feeds: return feeds[0], False - if feed_link.endswith('/'): + if feed_link and feed_link.endswith('/'): feeds = cls.objects.filter(feed_address=feed_address, feed_link=feed_link[:-1]) if feeds: return feeds[0], False diff --git a/apps/social/views.py b/apps/social/views.py index 672624384..c30962d93 100644 --- a/apps/social/views.py +++ b/apps/social/views.py @@ -877,7 +877,7 @@ def shared_stories_rss_feed(request, user_id, username): data['generator'] = 'NewsBlur' data['docs'] = None - shared_stories = MSharedStory.objects.filter(user_id=user.pk)[:30] + shared_stories = MSharedStory.objects.filter(user_id=user.pk).order_by('-shared_date')[:25] for shared_story in shared_stories: story_data = { 'title': shared_story.story_title, diff --git a/fabfile.py b/fabfile.py index 6ea779a27..1222a6f98 100644 --- a/fabfile.py +++ b/fabfile.py @@ -1,4 +1,4 @@ -from fabric.api import cd, env, local, parallel +from fabric.api import cd, env, local, parallel, serial from fabric.api import put, run, settings, sudo # from fabric.colors import red, green, blue, cyan, magenta, white, yellow try: @@ -105,6 +105,7 @@ def pull(): def pre_deploy(): compress_assets(bundle=True) +@serial def post_deploy(): cleanup_assets() @@ -126,10 +127,7 @@ def deploy_code(copy_assets=False, full=False): run('rm -fr static/*') if copy_assets: transfer_assets() - if full: - with settings(warn_only=True): - run('pkill -c gunicorn') - else: + with settings(warn_only=True): run('pkill -c gunicorn') # run('kill -HUP `cat logs/gunicorn.pid`') run('curl -s http://%s > /dev/null' % env.host) diff --git a/templates/social/social_page.xhtml b/templates/social/social_page.xhtml index 982677c87..8f486928d 100644 --- a/templates/social/social_page.xhtml +++ b/templates/social/social_page.xhtml @@ -6,7 +6,8 @@