Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
smithumble committed Aug 14, 2024
1 parent 1c0342f commit ff0b11f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 3 additions & 1 deletion procedure_tools/procedure.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,9 @@ def process_procedure(
bids_ids = [bid_json["data"]["id"] for bid_json in bids_jsons]
bids_tokens = [bid_json["access"]["token"] for bid_json in bids_jsons]
if tender_criteria:
bids_documents = [bid_json["data"].get("documents", []) for bid_json in bids_jsons]
bids_documents = [
bid_json["data"].get("documents", []) for bid_json in bids_jsons
]
post_bid_res(
client,
args,
Expand Down
4 changes: 3 additions & 1 deletion procedure_tools/utils/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ def bid_create_success_handler(response):
"qualificationDocuments",
):
for document in data.get(bid_document_container, []):
response = type('Response', (object,), {'json': lambda self: {"data": document}})()
response = type(
"Response", (object,), {"json": lambda self: {"data": document}}
)()
document_attach_success_handler(response)

logging.info(msg)
Expand Down
14 changes: 11 additions & 3 deletions procedure_tools/utils/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,9 +544,13 @@ def create_bids(client, ds_client, args, context, tender_id, prefix=""):
"qualificationDocuments",
):
bid_documents = []
for bid_document_data in bid_create_data["data"].get(bid_document_container, []):
for bid_document_data in bid_create_data["data"].get(
bid_document_container, []
):
upload_file = bid_document_data["title"]
ds_response = upload_document_ds(ds_client, args, context, upload_file)
ds_response = upload_document_ds(
ds_client, args, context, upload_file
)
if ds_response:
document_data = ds_response.json()["data"]
document_data.update(bid_document_data)
Expand Down Expand Up @@ -684,7 +688,11 @@ def upload_documents(
auth_token=args.token,
success_handler=document_attach_success_handler,
)
if not ignore_error or ignore_error and 200 <= response.status_code < 300:
if (
not ignore_error
or ignore_error
and 200 <= response.status_code < 300
):
responses.append(response)
return responses

Expand Down

0 comments on commit ff0b11f

Please sign in to comment.