diff --git a/auction/models.py b/auction/models.py index 41492c7..e817c01 100644 --- a/auction/models.py +++ b/auction/models.py @@ -62,11 +62,11 @@ class Inquiry(models.Model): @property def in_bidding(self): - return self.active and (self.bidding_end < timezone.now()) + return self.active and (self.bidding_end > timezone.now()) @property def in_selection(self): - return self.active and (self.auction_end < timezone.now()) + return self.active and (self.auction_end > timezone.now()) and not self.in_bidding @property def active(self): @@ -107,4 +107,4 @@ class Offer(models.Model): def inquiry_expiry(sender, instance, created, **kwargs): if not instance.expiry: instance.expiry = min(instance.arrival, (timezone.now() + timedelta(hours=int(getValue("auction.payment_period", 168)))).date()) - instance.save() \ No newline at end of file + instance.save() diff --git a/templates/auction/offer_noselect.html b/templates/auction/offer_noselect.html index 5005906..cbc20e1 100644 --- a/templates/auction/offer_noselect.html +++ b/templates/auction/offer_noselect.html @@ -15,13 +15,14 @@