Skip to content

Commit

Permalink
Can't sign contract before reviewing all complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
kroman0 committed Mar 22, 2016
1 parent 30e379a commit 4c0fd1d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion openprocurement/tender/limited/tests/tests.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[app:main]
use = egg:openprocurement.api

couchdb.db_name = tests
couchdb.db_name = limited
couchdb.url = http://op:op@localhost:5984/

auth.file = openprocurement/tender/limited/tests/auth.ini
Expand Down
9 changes: 9 additions & 0 deletions openprocurement/tender/limited/views/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
validate_patch_contract_data,
)
from openprocurement.api.views.contract import TenderAwardContractResource as BaseTenderAwardContractResource
from openprocurement.tender.openua.utils import PENDING_COMPLAINT_STATUS


def check_tender_status(request):
Expand Down Expand Up @@ -115,6 +116,14 @@ def patch(self):
self.request.errors.add('body', 'data', 'Can\'t sign contract before stand-still period end ({})'.format(stand_still_end.isoformat()))
self.request.errors.status = 403
return
if any([
i.status in PENDING_COMPLAINT_STATUS
for a in tender.awards
for i in a.complaints
]):
self.request.errors.add('body', 'data', 'Can\'t sign contract before reviewing all complaints')
self.request.errors.status = 403
return

if data['value']:
for ro_attr in ('valueAddedTaxIncluded', 'currency'):
Expand Down

0 comments on commit 4c0fd1d

Please sign in to comment.