data type error in config variables

This commit is contained in:
Phillip Kühne 2021-10-06 02:02:23 +02:00
parent ba4b5fb57c
commit 6a7b07ac9f

View File

@ -74,11 +74,11 @@ def settings_post():
entryquota = request.form.get("entryquota") entryquota = request.form.get("entryquota")
maxqueue = request.form.get("maxqueue") maxqueue = request.form.get("maxqueue")
if entryquota.isnumeric() and int(entryquota) > 0: if entryquota.isnumeric() and int(entryquota) > 0:
app.config['ENTRY_QUOTA'] = entryquota app.config['ENTRY_QUOTA'] = int(entryquota)
else: else:
abort(400) abort(400)
if maxqueue.isnumeric and int(maxqueue) > 0: if maxqueue.isnumeric and int(maxqueue) > 0:
app.config['MAX_QUEUE'] = maxqueue app.config['MAX_QUEUE'] = int(maxqueue)
else: else:
abort(400) abort(400)