Skip to content

Commit

Permalink
Merge pull request #60 from PeARSearch/fix-commenting-logic
Browse files Browse the repository at this point in the history
Fixed redirection to search page after commenting or feedback.
  • Loading branch information
minimalparts authored Jul 12, 2024
2 parents 49ba590 + 1d4defa commit adcfe28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/orchard/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def report():
mail_address = app.config['MAIL_USERNAME']
send_email(mail_address,'URL report','Report from user '+email+'<br>'+url+'<br>'+user_report)
flash(gettext("Your report has been sent. Thank you!"), "success")
return render_template('search/index.html')
return redirect(url_for('search.index'))
return render_template('orchard/report.html', form=form, email=email)


Expand All @@ -111,7 +111,7 @@ def feedback():
mail_address = app.config['MAIL_USERNAME']
send_email(mail_address,'Feedback report', 'Feedback from user '+email+'<br>'+user_report)
flash(gettext("Your feedback has been sent. Thank you!"), "success")
return render_template('search/index.html')
return redirect(url_for('search.index'))
return render_template('orchard/feedback.html', form=form, email=email)


Expand All @@ -137,6 +137,6 @@ def annotate():
db.session.add(u)
db.session.commit()
flash(gettext("Your note has been saved. Thank you!"), "success")
return render_template('search/index.html')
return redirect(url_for('search.index'))
else:
return render_template('orchard/annotate.html', form=form)

0 comments on commit adcfe28

Please sign in to comment.