Redirecting social RSS feed missing username.

This commit is contained in:
Samuel Clay 2021-07-24 10:23:21 -04:00
parent b43c67919b
commit ceb82da1b8
2 changed files with 2 additions and 1 deletions

View file

@ -29,6 +29,7 @@ urlpatterns = [
# url(r'^remove_like_reply/?$', views.remove_like_reply, name='social-remove-like-reply'),
url(r'^comment/(?P<comment_id>\w+)/reply/(?P<reply_id>\w+)/?$', views.comment_reply, name='social-comment-reply'),
url(r'^comment/(?P<comment_id>\w+)/?$', views.comment, name='social-comment'),
url(r'^rss/(?P<user_id>\d+)/?$', views.shared_stories_rss_feed, name='shared-stories-rss-feed'),
url(r'^rss/(?P<user_id>\d+)/(?P<username>[-\w]+)?$', views.shared_stories_rss_feed, name='shared-stories-rss-feed'),
url(r'^stories/(?P<user_id>\w+)/(?P<username>[-\w]+)?/?$', views.load_social_stories, name='load-social-stories'),
url(r'^page/(?P<user_id>\w+)/(?P<username>[-\w]+)?/?$', views.load_social_page, name='load-social-page'),

View file

@ -1315,7 +1315,7 @@ def shared_stories_rss_feed_noid(request):
return index
@ratelimit(minutes=1, requests=5)
def shared_stories_rss_feed(request, user_id, username):
def shared_stories_rss_feed(request, user_id, username=None):
try:
user = User.objects.get(pk=user_id)
except User.DoesNotExist: