Commit 0ce1bbc298a3391845e1db2e17946bb0e8686e8d

Authored by OrysiaDrabych
1 parent fc0eb51a

Edit get_document_by_id function

... ... @@ -64,6 +64,10 @@ def get_document_by_id(data, doc_id):
64 64 for document in complaint.get('documents', []):
65 65 if doc_id in document.get('title', ''):
66 66 return document
  67 + for contract in data.get('contracts', []):
  68 + for document in contract.get('documents', []):
  69 + if doc_id in document.get('title', ''):
  70 + return document
67 71 for award in data.get('awards', []):
68 72 for document in award.get('documents', []):
69 73 if doc_id in document.get('title', ''):
... ...
Please register or login to post a comment