Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1037 - Removes dead code and method. #1555

Merged
merged 1 commit into from
May 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions webcompat/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,17 @@ def file_issue():
return redirect(url_for('show_issue', number=response.get('number')))


@app.route('/', methods=['GET', 'POST'])
@app.route('/', methods=['GET'])
def index():
'''Main view where people come to report issues.'''
ua_header = request.headers.get('User-Agent')
bug_form = get_form(ua_header)
# browser_name is used in topbar.html to show the right add-on link
browser_name = get_browser_name(ua_header)
# GET means you want to file a report.
if request.method == 'GET':
if g.user:
get_user_info()
return render_template('index.html', form=bug_form,
browser=browser_name)
# Validate, then create issue.
elif bug_form.validate_on_submit():
return create_issue()

else:
# Validation failed, re-render the form with the errors.
return render_template('index.html', form=bug_form,
browser=browser_name)
if g.user:
get_user_info()
return render_template('index.html', form=bug_form, browser=browser_name)


@app.route('/issues')
Expand Down