File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414from flask import abort
1515from flask import Blueprint
1616from flask import g
17+ from flask import redirect
1718from flask import request
1819from flask import session
20+ from flask import url_for
1921
2022from webcompat import app
2123from webcompat import limiter
@@ -128,7 +130,8 @@ def get_issue_category(issue_category):
128130 # For paginated results on the /issues page,
129131 # see /issues/search/needstriage.
130132 elif issue_category == 'new' :
131- abort (301 )
133+ return redirect (url_for ('api.get_issue_category' ,
134+ issue_category = 'needstriage' ), 301 )
132135 else :
133136 # The path doesn’t exist. 404 Not Found.
134137 abort (404 )
@@ -189,7 +192,8 @@ def get_category_from_search(issue_category):
189192 query_string += ' state:closed '
190193 return get_search_results (query_string , params )
191194 elif issue_category == 'new' :
192- abort (301 )
195+ return redirect (url_for ('api.get_category_from_search' ,
196+ issue_category = 'needstriage' ), 301 )
193197 else :
194198 # no known keyword we send not found
195199 abort (404 )
You can’t perform that action at this time.
0 commit comments