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 @@

Angebote vergleichen

{% if object.offer_set.all %} - Zu deiner Anfrage sind bislang {{ object.offer_set.all|len }} Angebote eingegangen. Aber gedulde dich bitte noch ein wenig – vielleicht werden es ja noch mehr! Deine Angebote werden freigeschalten in: + Zu deiner Anfrage sind bislang {{ object.offer_set.all|length }} Angebote eingegangen. Aber gedulde dich bitte noch ein wenig – vielleicht werden es ja noch mehr! Deine Angebote werden freigeschalten in: {% else %}
+ {% endif %}
@@ -32,4 +33,4 @@ {% block "scripts" %} -{% endblock %} \ No newline at end of file +{% endblock %}