Add FlowResultType enum to data entry flow (#72955)
This commit is contained in:
parent
329595bf73
commit
f91aa33c5f
11 changed files with 79 additions and 53 deletions
|
@ -129,11 +129,11 @@ def websocket_depose_mfa(
|
|||
|
||||
def _prepare_result_json(result):
|
||||
"""Convert result to JSON."""
|
||||
if result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY:
|
||||
if result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY:
|
||||
data = result.copy()
|
||||
return data
|
||||
|
||||
if result["type"] != data_entry_flow.RESULT_TYPE_FORM:
|
||||
if result["type"] != data_entry_flow.FlowResultType.FORM:
|
||||
return result
|
||||
|
||||
data = result.copy()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue