Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/a212258620113578_fix_copy_active…
Browse files Browse the repository at this point in the history
…_lot'
  • Loading branch information
vmaksymiv committed Nov 14, 2016
2 parents 0457f1e + 13a6979 commit 9a146e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openprocurement/tender/competitivedialogue/databridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ def prepare_lot(orig_tender, lot_id, items):
:param items: list with related item for lot
:return: lot with new id
"""
lot = get_lot_by_id(orig_tender, lot_id)
if lot['status'] != 'active':
return False
for item in get_item_by_related_lot(orig_tender['items'], lot_id):
items.append(item)
lot = get_lot_by_id(orig_tender, lot_id)
return lot


Expand Down Expand Up @@ -258,6 +260,8 @@ def get_competitive_dialogue_data(self):
if qualification.get('lotID'):
if qualification['lotID'] not in old_lots: # check if lot id in local dict with new lots
lot = prepare_lot(tender, qualification['lotID'], items) # update lot with new id
if not lot: # Go next iter if not lot
continue
old_lots[qualification['lotID']] = lot # set new lot in local dict
bid = get_bid_by_id(tender['bids'], qualification['bidID'])
for bid_tender in bid['tenderers']:
Expand Down

0 comments on commit 9a146e4

Please sign in to comment.