url_for expects names, not actual functions

This commit is contained in:
Fabian Dill 2020-10-29 01:59:44 +01:00
parent 726406a75e
commit c5f3b47327
1 changed files with 2 additions and 2 deletions

View File

@ -87,8 +87,8 @@ def generate_api():
return {"text": f"Generation of seed {gen.id} started successfully.",
"detail": gen.id,
"encoded": app.url_map.converters["suuid"].to_url(None, gen.id),
"wait_api_url": url_for(wait_seed_api, seed=gen.id),
"url": url_for(wait_seed, seed=gen.id)}, 201
"wait_api_url": url_for("wait_seed_api", seed=gen.id),
"url": url_for("wait_seed", seed=gen.id)}, 201
except Exception as e:
return {"text": "Uncaught Exception:" + str(e)}, 500