Oops, let’s not double‐lock the database

This commit is contained in:
Timotej Lazar 2024-08-14 17:26:46 +02:00
parent 048195c45c
commit 5f1e1ae3e7

View file

@ -46,7 +46,7 @@ def edit(index):
system.run(system.save_config)
with db.locked():
return flask.render_template('rules/edit.html', index=index, rule=db.load('rules')[index], ipsets=ipsets.read())
return flask.render_template('rules/edit.html', index=index, rule=db.read('rules')[index], ipsets=ipsets.read())
except IndexError as e:
return flask.Response(f'invalid rule: {index}', status=400, mimetype='text/plain')