def validate_value(self, data, value):
     auction = get_auction(data['__parent__'])
     if auction.get('value').currency != value.currency:
         raise ValidationError(
             u"currency of taxHolidays value should be identical to currency of value of auction"
         )
 def validate_startDate(self, data, startDate):
     auction = get_auction(data['__parent__'])
     if not auction.revisions and not startDate:
         raise ValidationError(u'This field is required.')
Exemplo n.º 3
0
 def participation_url(self):
     if not self.participationUrl and self.status == "active":
         request = get_auction(self).__parent__.request
         url = generate_auction_url(request, bid_id=str(self.id))
         return url