fix: harden Polygon operation validation

This commit is contained in:
Repinoid
2026-10-25 14:07:13 +03:00
parent 3df89ec9e7
commit e3a031ce50
18 changed files with 803 additions and 346 deletions
+2 -2
View File
@@ -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: