Skip to content

Commit 267f2fd

Browse files
committed
Fix global variable in teach
1 parent 8ccc304 commit 267f2fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ def get_vocabulary():
4949

5050
@app.route("/api/vocabulary/", methods=["POST"])
5151
def post_vocabulary():
52+
global vocabulary
53+
5254
# Check whether all fields have a value
5355
for i in ["answer", "question"]:
5456
for j in range(1, 11):
5557
if not request.form.get(i + str(j)):
5658
return jsonify({"error": "Nicht alles ausgefüllt"})
57-
5859
vocabulary = [
5960
{"question": request.form.get("question1"), "answer": request.form.get("answer1")},
6061
{"question": request.form.get("question2"), "answer": request.form.get("answer2")},

0 commit comments

Comments
 (0)