File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed
Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,6 @@ def _from_proto(cls, job_proto):
105105 repeats = job_proto .repeats if job_proto .HasField ('repeats' ) else None ,
106106 due_time = job_proto .due_time if job_proto .HasField ('due_time' ) else None ,
107107 ttl = job_proto .ttl if job_proto .HasField ('ttl' ) else None ,
108- data = job_proto .data if job_proto .HasField ('data' ) else None ,
108+ data = job_proto .data if job_proto .HasField ('data' ) and job_proto . data . value else None ,
109109 overwrite = job_proto .overwrite ,
110110 )
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ def __init__(
109109 super (InvokeMethodRequest , self ).__init__ (())
110110
111111 self ._content_type = content_type
112- self ._http_verb = None
112+ self ._http_verb : Optional [ str ] = None
113113 self ._http_querystring : Dict [str , str ] = {}
114114
115115 self .set_data (data )
Original file line number Diff line number Diff line change @@ -111,5 +111,5 @@ The Jobs API supports multiple schedule formats:
111111- Requires Dapr runtime v1.14+ for Jobs API support
112112
113113For more information about the Jobs API, see:
114- - [ Dapr Scheduler Building Block] ( https://docs.dapr.io/developing-applications/building-blocks/scheduler / )
114+ - [ Dapr Jobs Building Block] ( https://docs.dapr.io/developing-applications/building-blocks/jobs / )
115115- [ Dapr Jobs API Proposal] ( https://github.com/dapr/proposals/blob/main/0012-BIRS-distributed-scheduler.md )
Original file line number Diff line number Diff line change @@ -1301,6 +1301,11 @@ def test_schedule_job_alpha1_validation_error(self):
13011301 job = Job (name = '' , schedule = '@every 1m' )
13021302 dapr .schedule_job_alpha1 (job )
13031303
1304+ # Test missing schedule and due_time - this should be caught by client validation
1305+ with self .assertRaises (ValueError ):
1306+ job = Job (name = 'test-job' )
1307+ dapr .schedule_job_alpha1 (job )
1308+
13041309 def test_get_job_alpha1_success (self ):
13051310 """Test successful job retrieval."""
13061311 dapr = DaprGrpcClient (f'{ self .scheme } localhost:{ self .grpc_port } ' )
You can’t perform that action at this time.
0 commit comments