def validate_value(self, data, value):
     if value and isinstance(data['__parent__'],
                             Model) and data['relatedLot']:
         validate_LotValue_value(get_tender(data['__parent__']),
                                 data['relatedLot'], value)
 def validate_value(self, data, value):
     if value and isinstance(data['__parent__'], Bid) and (
             data['__parent__'].status
             not in ('invalid', 'deleted', 'draft')) and data['relatedLot']:
         validate_LotValue_value(get_tender(data['__parent__']),
                                 data['relatedLot'], value)