Skip to content

Commit 21fb454

Browse files
committed
Fixed missed path validation for update_line_item. Fixed merge conflicts.
2 parents 4f8a7bf + fbc0de4 commit 21fb454

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

dynatademand/api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,11 @@ def update_line_item(self, project_id, line_item_id, line_item_data):
241241
Updates the specified line item by setting the values of the parameters passed.
242242
Any parameters not provided will be left unchanged.
243243
'''
244-
# self._validate_object('request_path','update_line_item', {'extProjectId': project_id, 'extLineItemId': line_item_id})
244+
# Validate path and request body.
245+
self._validate_object('request_path', 'update_line_item', {
246+
'extProjectId': '{}'.format(project_id),
247+
'extLineItemId': '{}'.format(line_item_id),
248+
})
245249
self._validate_object('request_body', 'update_line_item', line_item_data)
246250
response_data = self._api_post('/projects/{}/lineItems/{}'.format(project_id, line_item_id), line_item_data)
247251
if response_data.get('status').get('message') != 'success':

dynatademand/schemas/request/path/update_line_item.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
"type": "object",
33
"properties": {
44
"extProjectId": {
5-
"type": "string",
6-
"required": true
5+
"type": "string"
76
},
87
"extLineItemId": {
9-
"type": "string",
10-
"required": true
8+
"type": "string"
119
}
1210
},
1311
"required": [

0 commit comments

Comments
 (0)