From c3fe9e85d61732e3ae801523508c084c0d6cce97 Mon Sep 17 00:00:00 2001 From: bug_creator Date: Wed, 1 Dec 2021 19:09:55 +0800 Subject: [PATCH] Fix text bug --- app/main/views.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/main/views.py b/app/main/views.py index 6dbd5e2..987146e 100644 --- a/app/main/views.py +++ b/app/main/views.py @@ -924,9 +924,9 @@ def new_question_md(): db.session.add(question) db.session.commit() if question.is_anonymous: - flash("You have just posted a posting anonymously", 'success') + flash("You have just posted a question anonymously", 'success') else: - flash("You have just posted a posting", 'success') + flash("You have just posted a question", 'success') return redirect(url_for('.index')) return render_template('new_posting/new_mdquestion.html', form=form, default_body="", default_title="") @@ -989,9 +989,9 @@ def new_answer_md(question_id): db.session.add(post) db.session.commit() if post.is_anonymous: - flash("You have just modified an answer anonymously", 'success') + flash("You have just posted an answer anonymously", 'success') else: - flash("You have just modified an answer", 'success') + flash("You have just posted an answer", 'success') return redirect(url_for('.view_question', question_id=question_id)) return render_template('new_posting/new_mdanswer.html', form=form, default_body="") @@ -1016,10 +1016,10 @@ def edit_answer_md(answer_id): answer.recent_activity = datetime.utcnow() db.session.add(answer) db.session.commit() - if answer.is_anonymous: - flash("You have just posted a posting anonymously", 'success') + if post.is_anonymous: + flash("You have just modified an answer anonymously", 'success') else: - flash("You have just posted a posting", 'success') + flash("You have just modified an answer", 'success') return redirect(url_for('.index')) return render_template('new_posting/new_mdanswer.html', form=form, default_body=answer.body)