Fix implementation of Flask wrapper decorators

This commit is contained in:
RunasSudo 2017-11-22 23:35:46 +11:00
parent ed6b1de5a6
commit 3fc98c8a36
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -25,6 +25,8 @@ from eos.psr.workflow import *
import eos.core.hashing
import functools
app = flask.Flask(__name__)
@app.cli.command('test')
@ -81,6 +83,7 @@ def index():
return flask.render_template('index.html')
def using_election(func):
@functools.wraps(func)
def wrapped(election_id):
election = Election.get_by_id(election_id)
return func(election)