From 4f6a4d268149c85c7ca064e436f82d5c55970726 Mon Sep 17 00:00:00 2001 From: sqozz Date: Fri, 28 Dec 2018 07:35:45 +0100 Subject: [PATCH] Return 409 if torrent already exists --- indexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indexer.py b/indexer.py index df73d1f..4fb0d5c 100644 --- a/indexer.py +++ b/indexer.py @@ -124,7 +124,7 @@ def create(): message = _("Successfully created torrent {}").format(newTorrent.fileid, newTorrent.fileid[:-20]) return render_template("create.html", categories=categories.categories, messages=[message], tracker=settings["valid_tracker"]) else: - return render_template("create.html", categories=categories.categories, errors=newTorrent.errors, tracker=settings["valid_tracker"]) + return render_template("create.html", categories=categories.categories, errors=newTorrent.errors, tracker=settings["valid_tracker"]), 409 @app.route("/download/")