def add_bid(self, lot, amount):
    from auction.models import BidItem
    self.save()
    if (not lot.is_biddable):
        return False
    try:
        amount = Decimal(amount)
    except Exception as e:
        amount = Decimal('0')
    from auction.models.lot import Lot
    (item, created) = BidItem.objects.get_or_create(bid_basket=self, content_type=ContentType.objects.get_for_model(Lot), lot_id=lot.pk)
    if item:
        item.amount = amount
        item.save()
    return item
def add_bid(self, lot, amount):
    from auction.models import BidItem
    self.save()
    if (not lot.is_biddable):
        return False
    try:
        amount = Decimal(amount)
    except Exception as e:
        amount = Decimal('0')
    from auction.models.lot import Lot
    (item, created) = BidItem.objects.get_or_create(bid_basket=self, content_type=ContentType.objects.get_for_model(Lot), lot_id=lot.pk)
    if item:
        item.amount = amount
        item.save()
    return item