Oops, let’s not double‐lock the database
This commit is contained in:
parent
048195c45c
commit
5f1e1ae3e7
|
@ -46,7 +46,7 @@ def edit(index):
|
||||||
system.run(system.save_config)
|
system.run(system.save_config)
|
||||||
|
|
||||||
with db.locked():
|
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:
|
except IndexError as e:
|
||||||
return flask.Response(f'invalid rule: {index}', status=400, mimetype='text/plain')
|
return flask.Response(f'invalid rule: {index}', status=400, mimetype='text/plain')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue