File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -549,7 +549,20 @@ def create_job_definition(self, model: CreateJobDefinition) -> str:
549549 if not self .file_exists (model .input_uri ):
550550 raise InputUriError (model .input_uri )
551551
552- job_definition = JobDefinition (** model .dict (exclude_none = True , exclude = {"input_uri" }))
552+ orm_notifications_config = None
553+ if model .notifications_config :
554+ orm_notifications_config = NotificationsConfigTable (
555+ ** model .notifications_config .dict ()
556+ )
557+ session .add (orm_notifications_config )
558+ session .flush ()
559+
560+ job_definition_data = model .dict (
561+ exclude = {"input_uri" , "notifications_config" }, exclude_none = True
562+ )
563+ job_definition = JobDefinition (
564+ ** job_definition_data , notifications_config = orm_notifications_config
565+ )
553566 session .add (job_definition )
554567 session .commit ()
555568
You can’t perform that action at this time.
0 commit comments