Procházet zdrojové kódy

make changes to on_submission_change

Toan Quach před 1 rokem
rodič
revize
7d827c5d04

+ 1 - 0
taipy/core/notification/notifier.py

@@ -82,6 +82,7 @@ class Notifier:
                     <li>TASK</li>
                     <li>DATA_NODE</li>
                     <li>JOB</li>
+                    <li>SUBMISSION</li>
                 </ul>
             entity_id (Optional[str]): If provided, the listener will be notified
                 for all events related to this entity. Otherwise, the listener

+ 6 - 2
taipy/gui_core/_context.py

@@ -175,8 +175,12 @@ class _GuiCoreContext(CoreEventConsumerBase):
                                 client_id,
                                 submission_name,
                                 [
-                                    core_get(submission.entity_id),
-                                    {"submission_status": new_status.name, **(event.metadata if event else {})},
+                                    core_get(submission.id),
+                                    {
+                                        "submission_status": new_status.name,
+                                        "submittable_entity_id": core_get(submission.entity_id),
+                                        **(event.metadata if event else {}),
+                                    },
                                 ],
                                 submission.properties.get("module_context"),
                             )