From 4cd0391c724bf00a0c8b1e470cd5dc5e982cd9f5 Mon Sep 17 00:00:00 2001
From: Mohammad Torkashvand <mohammad.torkashvand@geant.org>
Date: Thu, 3 Apr 2025 09:48:09 +0200
Subject: [PATCH] add TTNumber to state for L3 trmination wfs

---
 gso/workflows/l3_core_service/geant_ip/terminate_geant_ip.py | 5 +++--
 gso/workflows/l3_core_service/ias/terminate_ias.py           | 5 +++--
 gso/workflows/l3_core_service/lhcone/terminate_lhcone.py     | 5 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/gso/workflows/l3_core_service/geant_ip/terminate_geant_ip.py b/gso/workflows/l3_core_service/geant_ip/terminate_geant_ip.py
index afae36f22..b96474dd6 100644
--- a/gso/workflows/l3_core_service/geant_ip/terminate_geant_ip.py
+++ b/gso/workflows/l3_core_service/geant_ip/terminate_geant_ip.py
@@ -20,8 +20,9 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
     class TerminateForm(SubmitFormPage):
         tt_number: TTNumber
 
-    yield TerminateForm
-    return {"subscription": subscription}
+    user_input = yield TerminateForm
+
+    return {"subscription": subscription} | user_input.model_dump()
 
 
 @workflow(
diff --git a/gso/workflows/l3_core_service/ias/terminate_ias.py b/gso/workflows/l3_core_service/ias/terminate_ias.py
index c6d2f2272..5cc25a6e2 100644
--- a/gso/workflows/l3_core_service/ias/terminate_ias.py
+++ b/gso/workflows/l3_core_service/ias/terminate_ias.py
@@ -20,8 +20,9 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
     class TerminateForm(SubmitFormPage):
         tt_number: TTNumber
 
-    yield TerminateForm
-    return {"subscription": subscription}
+    user_input = yield TerminateForm
+
+    return {"subscription": subscription} | user_input.model_dump()
 
 
 @workflow(
diff --git a/gso/workflows/l3_core_service/lhcone/terminate_lhcone.py b/gso/workflows/l3_core_service/lhcone/terminate_lhcone.py
index c82f7f7ae..021e2b70b 100644
--- a/gso/workflows/l3_core_service/lhcone/terminate_lhcone.py
+++ b/gso/workflows/l3_core_service/lhcone/terminate_lhcone.py
@@ -20,8 +20,9 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
     class TerminateForm(SubmitFormPage):
         tt_number: TTNumber
 
-    yield TerminateForm
-    return {"subscription": subscription}
+    user_input = yield TerminateForm
+
+    return {"subscription": subscription} | user_input.model_dump()
 
 
 @workflow(
-- 
GitLab