Return 409 if torrent already exists

This commit is contained in:
sqozz 2018-12-28 07:35:45 +01:00
parent 11522b79f0
commit 4f6a4d2681
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ def create():
message = _("Successfully created torrent <a href=\"/search?h={}\">{}</a>").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/<filename>")