Skip to content

Commit

Permalink
Fixed patching tender
Browse files Browse the repository at this point in the history
  • Loading branch information
kroman0 committed Jan 9, 2015
1 parent 0785055 commit a3fee24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openprocurement/api/views/tender.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def patch(self):
self.request.errors.status = 403
return
data = self.request.validated['data']
if self.request.authenticated_role == 'tender_owner' and 'status' in data and data['status'] != 'cancelled':
if self.request.authenticated_role == 'tender_owner' and 'status' in data and data['status'] not in ['cancelled', tender.status]:
self.request.errors.add('body', 'data', 'Can\'t update tender status')
self.request.errors.status = 403
return
Expand Down

0 comments on commit a3fee24

Please sign in to comment.