mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Fix rendering of task errors
This commit is contained in:
parent
6b9614314c
commit
f9048a8f49
@ -55,7 +55,10 @@ def check(id):
|
|||||||
if current_user.is_authenticated and current_user.rank.at_least(UserRank.ADMIN):
|
if current_user.is_authenticated and current_user.rank.at_least(UserRank.ADMIN):
|
||||||
info["error"] = str(traceback)
|
info["error"] = str(traceback)
|
||||||
elif str(result)[1:12] == "TaskError: ":
|
elif str(result)[1:12] == "TaskError: ":
|
||||||
info["error"] = str(result)[12:-1]
|
if hasattr(result, "value"):
|
||||||
|
info["error"] = result.value
|
||||||
|
else:
|
||||||
|
info["error"] = str(result)
|
||||||
else:
|
else:
|
||||||
info["error"] = "Unknown server error"
|
info["error"] = "Unknown server error"
|
||||||
else:
|
else:
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<h1>{{ self.title() }}</h1>
|
<h1>{{ self.title() }}</h1>
|
||||||
|
|
||||||
{% if "error" in info or info.status == "FAILURE" or info.status == "REVOKED" %}
|
{% if "error" in info or info.status == "FAILURE" or info.status == "REVOKED" %}
|
||||||
<pre>{{ info.error }}</pre>
|
<pre style="white-space: pre-wrap; word-wrap: break-word;">{{ info.error }}</pre>
|
||||||
{% else %}
|
{% else %}
|
||||||
<script src="/static/js/polltask.js"></script>
|
<script src="/static/js/polltask.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
Loading…
Reference in New Issue
Block a user