Skip to content

Commit

Permalink
Merge branch 'fix/remove_patch_value' into 'master'
Browse files Browse the repository at this point in the history
Remove calculation value.amount for tender

See merge request pricequotation/openprocurement.bridge.pricequotation!13
  • Loading branch information
yshalenyk committed May 26, 2020
2 parents be04152 + 8468bce commit 3c0e28e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions openprocurement/bridge/pricequotation/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,12 @@ def process_resource(self, resource):
if key in rq:
rq[key] = str(rq[key])

value = deepcopy(profile.data.value)
amount = sum([item["quantity"] for item in items]) * profile.data.value.amount
value["amount"] = amount
data = {
"data": {
"criteria": profile.data.criteria,
"items": items,
"shortlistedFirms": shortlisted_firms,
"status": status,
"value": value
"status": status
}
}
self.tender_client.patch_resource_item(resource["id"], data)
Expand Down
6 changes: 1 addition & 5 deletions openprocurement/bridge/pricequotation/tests/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ def test_process_resource(self, logger, tender_client, ecatalogue_client, mocked
if 'additionalClassifications' in TEST_PROFILE['data']:
items[0]['additionalClassifications'] = TEST_PROFILE['data']['additionalClassifications']
items[0]['unit'] = TEST_PROFILE['data']['unit']
value = deepcopy(TEST_PROFILE['data']['value'])
amount = sum([item["quantity"] for item in items]) * TEST_PROFILE['data']['value']['amount']
value['amount'] = amount
shortlisted_firms = [s for s in TEST_CATEGORY['data']['suppliers'] if s['status'] == 'active']
criteria = deepcopy(TEST_PROFILE['data']['criteria'])
for criterion in criteria:
Expand All @@ -154,8 +151,7 @@ def test_process_resource(self, logger, tender_client, ecatalogue_client, mocked
'criteria': criteria,
'status': 'active.tendering',
'items': items,
'shortlistedFirms': shortlisted_firms,
'value': value
'shortlistedFirms': shortlisted_firms
}
}
self.assertEquals(handler.tender_client.patch_resource_item.mock_calls[0], call(resource.data.id, patch_data))
Expand Down

0 comments on commit 3c0e28e

Please sign in to comment.