Commit 760ef5340dce4ade1c6082df769a65687f850beb
1 parent
374511dc
Add section for search in cancellations
Into `get_document_by_id` in order to find documents in cancelation.robot
Showing
1 changed file
with
4 additions
and
0 deletions
| ... | ... | @@ -54,6 +54,10 @@ def get_document_by_id(data, doc_id): |
| 54 | 54 | for document in complaint.get('documents', []): |
| 55 | 55 | if doc_id in document.get('title', ''): |
| 56 | 56 | return document |
| 57 | + for cancellation in data.get('cancellations', []): | |
| 58 | + for document in cancellation.get('documents', []): | |
| 59 | + if doc_id in document.get('title', ''): | |
| 60 | + return document | |
| 57 | 61 | raise Exception('Document with id {} not found'.format(doc_id)) |
| 58 | 62 | |
| 59 | 63 | |
| ... | ... |
Please
register
or
login
to post a comment