Revised the retrieve_status() template tag and renamed the errors template variable to page_errors in the Mia core application.
This commit is contained in:
parent
50c06bd3d3
commit
7ae30f9980
@ -133,9 +133,12 @@ def retrieve_status(context):
|
|||||||
return ""
|
return ""
|
||||||
if "success" in status:
|
if "success" in status:
|
||||||
context.dicts[0]["success"] = status["success"]
|
context.dicts[0]["success"] = status["success"]
|
||||||
if "errors" in status:
|
if "errors_by_field" in status:
|
||||||
if "" in status["errors"]:
|
if "" in status["errors_by_field"]:
|
||||||
context.dicts[0]["errors"] = status["errors"][""]
|
if "page_errors" not in context.dicts[0]:
|
||||||
|
context.dicts[0]["page_errors"] = []
|
||||||
|
context.dicts[0]["page_errors"].append(
|
||||||
|
status["errors_by_field"][""])
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user