diff --git a/taipy/gui_core/_context.py b/taipy/gui_core/_context.py index 5828ed670a..5363ff21b0 100644 --- a/taipy/gui_core/_context.py +++ b/taipy/gui_core/_context.py @@ -69,15 +69,15 @@ def __init__( client_id: str, module_context: str, callback: t.Callable, - submission: Submission, + submission_status: SubmissionStatus, ) -> None: self.client_id = client_id self.module_context = module_context self.callback = callback - self.submission = submission + self.submission_status = submission_status - def set_submission(self, submission: Submission): - self.submission = submission + def set_submission_status(self, submission_status: SubmissionStatus): + self.submission_status = submission_status return self @@ -183,7 +183,7 @@ def scenario_status_callback(self, submission_id: t.Optional[str]): return new_status = submission.submission_status - if sub_details.submission.submission_status != new_status: + if sub_details.submission_status != new_status: # callback self.gui._call_user_callback( sub_details.client_id, @@ -199,7 +199,7 @@ def scenario_status_callback(self, submission_id: t.Optional[str]): ): self.client_submission.pop(submission_id, None) else: - self.client_submission[submission_id] = sub_details.set_submission(submission) + self.client_submission[submission_id] = sub_details.set_submission_status(new_status) except Exception as e: _warn(f"Submission ({submission_id}) is not available", e) @@ -443,7 +443,7 @@ def submit_entity(self, state: State, id: str, payload: t.Dict[str, str]): client_id, module_context, submission_fn, - submission_entity, + submission_entity.submission_status, ) else: _warn(f"on_submission_change(): '{submission_cb}' is not a valid function.")