Skip to content

Commit

Permalink
Merge d024f55 into 9df7ba6
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksiyVeretiuk committed Mar 28, 2019
2 parents 9df7ba6 + d024f55 commit 4f67abd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ def act(self):
bids = self.context.bids
active_bids = [bid for bid in bids if bid.status == 'active']

# in the end of enquiry period
# all bids that are in status 'draft/pending'
# switch to 'unsuccessful' status
for bid in self.context['bids']:
if bid.status in ['draft', 'pending']:
bid.status = 'unsuccessful'

if min_number == 1:
if len(active_bids) == 0:
status = 'unsuccessful'
Expand All @@ -134,13 +141,6 @@ def act(self):
elif len(active_bids) >= 2:
status = 'active.auction'

# in the end of enquiry period
# all bids that are in status 'draft/pending'
# switch to 'unsuccessful' status
for bid in self.context['bids']:
if bid.status in ['draft', 'pending']:
bid.status = 'unsuccessful'

self.context.status = status
log_auction_status_change(self.request, self.context, self.context.status)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
BID_PENDING_FIRST,
BID_PENDING_FIRST_WITH_DOCUMENT,
BID_PENDING_SECOND,
BID_UNSUCCESSFUL_FIRST
)
from openprocurement.auctions.geb.tests.fixtures.calculator import (
Calculator
Expand Down Expand Up @@ -174,7 +173,7 @@
# and minNumberOfQualifiedBids = 1
# which will lead to the status 'active.qualification' auction
auction = deepcopy(END_ACTIVE_ENQUIRY_AUCTION)
auction['bids'] = [BID_UNSUCCESSFUL_FIRST, BID_ACTIVE_SECOND]
auction['bids'] = [BID_PENDING_FIRST, BID_ACTIVE_SECOND]
auction['minNumberOfQualifiedBids'] = 1
END_ACTIVE_ENQUIRY_AUCTION_QUALIFICATION_WITH_1_ACTIVE_AND_UNSUCCESSFUL = auction

Expand Down

0 comments on commit 4f67abd

Please sign in to comment.