Skip to content

Commit

Permalink
Merge pull request #63 from prozorro-sale/a495973709603869_bids_to_aw…
Browse files Browse the repository at this point in the history
…ards

A495973709603869 bids to awards
  • Loading branch information
leits committed Feb 8, 2018
2 parents 39b9626 + 67a32af commit b7ddaff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion openprocurement/auctions/dgf/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ def read_json(name):

#code units
CPV_NON_SPECIFIC_LOCATION_UNITS = ('71', '72', '73', '75', '76', '77', '79', '80', '85', '90', '92', '98')
CAV_NON_SPECIFIC_LOCATION_UNITS = ('07', '08')
CAV_NON_SPECIFIC_LOCATION_UNITS = ('07', '08')
10 changes: 6 additions & 4 deletions openprocurement/auctions/dgf/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from itertools import izip_longest
from logging import getLogger
from pkg_resources import get_distribution
from barbecue import chef
Expand Down Expand Up @@ -89,9 +90,10 @@ def create_awards(request):
bids_to_qualify = NUMBER_OF_BIDS_TO_BE_QUALIFIED \
if (len(bids) > NUMBER_OF_BIDS_TO_BE_QUALIFIED) \
else len(bids)
for i in xrange(0, bids_to_qualify):
status = 'pending.verification' if i == 0 else 'pending.waiting'
bid = bids[i].serialize()
for bid, status in izip_longest(bids[:bids_to_qualify],
['pending.verification'],
fillvalue='pending.waiting'):
bid = bid.serialize()
award = type(auction).awards.model_class({
'__parent__': request.context,
'bid_id': bid['id'],
Expand Down Expand Up @@ -224,4 +226,4 @@ def invalidate_bids_data(request):
auction = request.validated['auction']
for bid in auction.bids:
setattr(bid, "status", "invalid")
auction.rectificationPeriod.invalidationDate = get_now()
auction.rectificationPeriod.invalidationDate = get_now()

0 comments on commit b7ddaff

Please sign in to comment.