fix: harden Polygon operation validation
This commit is contained in:
@@ -54,6 +54,7 @@ def apply_effect(op_uid, mock_state, services):
|
||||
svc_def = services.get(svc_id, {})
|
||||
template = svc_def.get("stateParams", {})
|
||||
inst["state"]["params"] = dict(template)
|
||||
_merge_params(inst, op_params, op.get("svcOperationId"), services)
|
||||
# stateOut из шаблона
|
||||
state_out_template = svc_def.get("stateOut", {})
|
||||
inst["state"]["out"] = {k: dict(v) for k, v in state_out_template.items()}
|
||||
@@ -64,8 +65,7 @@ def apply_effect(op_uid, mock_state, services):
|
||||
_merge_params(inst, op_params, op.get("svcOperationId"), services)
|
||||
|
||||
elif action == "delete":
|
||||
if instance_uid in mock_state.instances:
|
||||
del mock_state.instances[instance_uid]
|
||||
mock_state.delete_instance(instance_uid)
|
||||
|
||||
elif action == "suspend":
|
||||
if inst:
|
||||
|
||||
Reference in New Issue
Block a user