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):
105
105
repeats = job_proto .repeats if job_proto .HasField ('repeats' ) else None ,
106
106
due_time = job_proto .due_time if job_proto .HasField ('due_time' ) else None ,
107
107
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 ,
109
109
overwrite = job_proto .overwrite ,
110
110
)
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ def __init__(
109
109
super (InvokeMethodRequest , self ).__init__ (())
110
110
111
111
self ._content_type = content_type
112
- self ._http_verb = None
112
+ self ._http_verb : Optional [ str ] = None
113
113
self ._http_querystring : Dict [str , str ] = {}
114
114
115
115
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:
111
111
- Requires Dapr runtime v1.14+ for Jobs API support
112
112
113
113
For 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 / )
115
115
- [ 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):
1301
1301
job = Job (name = '' , schedule = '@every 1m' )
1302
1302
dapr .schedule_job_alpha1 (job )
1303
1303
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
+
1304
1309
def test_get_job_alpha1_success (self ):
1305
1310
"""Test successful job retrieval."""
1306
1311
dapr = DaprGrpcClient (f'{ self .scheme } localhost:{ self .grpc_port } ' )
You can’t perform that action at this time.
0 commit comments